diff --git a/.githooks/commit-msg b/.githooks/commit-msg index 26b4e3eb0..3a1276348 100755 --- a/.githooks/commit-msg +++ b/.githooks/commit-msg @@ -43,9 +43,12 @@ else echo "~~~~**** Error: Commit Signature Missing. ****~~~~" echo "Please make sure to sign your commits. You can sign your commit by using the '-S' option with 'git commit'." echo "Example: git commit -S -m 'Your commit message'" + echo "Signing commits is crucial for verifying contributions. Consult GitHub's documentation on commit signature verification for guidance: https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits" exit 1 fi # If the commit message matches the convention, the script exits successfully. +echo echo "*****~~~~~ Commit hook completed ~~~~~~*****" +echo exit 0 diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 987dd59bb..c91742e85 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -39,4 +39,3 @@ Or did you test this change manually (provide relevant screenshots)? - [ ] I ran `npm run re:build` - [ ] I reviewed submitted code - [ ] I added unit tests for my changes where possible -- [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable diff --git a/.gitignore b/.gitignore index 3fdff3ada..c1ebc1891 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,5 @@ env-config.js yarn.lock #package-lock.json user_data.sh -*.pem \ No newline at end of file +*.pem +.bsb.lock diff --git a/README.md b/README.md index 29d5b0d3f..c93b1e70f 100644 --- a/README.md +++ b/README.md @@ -267,10 +267,82 @@ curl https://raw.githubusercontent.com/juspay/hyperswitch-control-center/main/aw --- +## Changelog + +For a detailed list of changes made in each version, please refer to the [Changelog](./CHANGELOG.md) file. + +--- + ## Contributing We welcome contributions from the community! If you would like to contribute to Hyperswitch, please follow our contribution guidelines. +### Commit Conventions + +We follow the [Conventional Commits](https://www.conventionalcommits.org/) specification for our commit messages. Each commit message should have a structured format: + +`(): ` + +The commit message should begin with one of the following keywords followed by a colon: 'feat', 'fix', 'chore', 'refactor', 'docs', 'test' or 'style'. For example, it should be formatted like this: `feat: - ` + +### Signing Commits + +All commits should be signed to verify the authenticity of contributors. Follow the steps below to sign your commits: + +1. Generate a GPG key if you haven't already: + + ```bash + gpg --gen-key + ``` + +2. List your GPG keys and copy the GPG key ID:: + + ```bash + gpg --list-secret-keys --keyid-format LONG + ``` + + #### Identify the GPG key you want to add to your GitHub account. + + a. Run the following command to export your GPG public key in ASCII-armored format: + + ```bash + gpg --armor --export + Replace with the actual key ID. + ``` + + b. Copy the entire output, including the lines that start with "-----BEGIN PGP PUBLIC KEY BLOCK-----" and "-----END PGP PUBLIC KEY BLOCK-----". + + c. Go to your GitHub Settings. + + d. Click on "SSH and GPG keys" in the left sidebar. + + e. Click the "New GPG key" button. + + f. Paste your GPG public key into the provided text box. + + g. Click the "Add GPG key" button. + + h. Now your GPG public key is associated with your GitHub account, and you can sign your commits for added security. + +3. Configure Git to use your GPG key: + + ```bash + git config --global user.signingkey + ``` + +4. Set Git to sign all your commits by default: + + ```bash + git config --global commit.gpgSign true + ``` + +5. Commit your changes with the -S option to sign the commit: + ```bash + git commit -S -m "your commit message" + ``` + +For further assistance, please refer to the [GitHub documentation on signing commits](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits). + --- ## License diff --git a/src/entryPoints/hyperswitch/EntryPointUtils.res b/src/entryPoints/hyperswitch/EntryPointUtils.res index 5b67e4f6d..8c3e13a98 100644 --- a/src/entryPoints/hyperswitch/EntryPointUtils.res +++ b/src/entryPoints/hyperswitch/EntryPointUtils.res @@ -37,7 +37,7 @@ module ContextWrapper = { } } -let renderDashboardApp = (~uiConfig=UIConfig.defaultUIConfig, children) => { +let renderDashboardApp = (~uiConfig, children) => { switch ReactDOM.querySelector("#app") { | Some(container) => open ReactDOM.Client diff --git a/src/entryPoints/hyperswitch/Provider/GlobalProvider.res b/src/entryPoints/hyperswitch/Provider/GlobalProvider.res index 10a8b7365..894350380 100644 --- a/src/entryPoints/hyperswitch/Provider/GlobalProvider.res +++ b/src/entryPoints/hyperswitch/Provider/GlobalProvider.res @@ -8,8 +8,6 @@ let defaultValue = { setShowProdIntentForm: _ => (), integrationDetails: defaultIntegrationValue, setIntegrationDetails: _ => (), - tabIndexForDevelopers: 0, - setTabIndexForDevelopers: _ => (), dashboardPageState: #DEFAULT, setDashboardPageState: _ => (), permissionInfo: [], @@ -23,11 +21,6 @@ let defaultValue = { let defaultContext = React.createContext(defaultValue) module Provider = { - let makeProps = (~value, ~children, ()) => - { - "value": value, - "children": children, - } let make = React.Context.provider(defaultContext) } @@ -35,7 +28,6 @@ module Provider = { let make = (~children) => { let (showFeedbackModal, setShowFeedbackModal) = React.useState(_ => false) let (showProdIntentForm, setShowProdIntentForm) = React.useState(_ => false) - let (tabIndexForDevelopers, setTabIndexForDevelopers) = React.useState(_ => 0) let (dashboardPageState, setDashboardPageState) = React.useState(_ => #DEFAULT) let (permissionInfo, setPermissionInfo) = React.useState(_ => []) let (isProdIntentCompleted, setIsProdIntentCompleted) = React.useState(_ => false) @@ -56,8 +48,6 @@ let make = (~children) => { integrationDetails, showProdIntentForm, setShowProdIntentForm, - tabIndexForDevelopers, - setTabIndexForDevelopers, dashboardPageState, setDashboardPageState, permissionInfo, diff --git a/src/entryPoints/hyperswitch/Provider/ProviderHelper.res b/src/entryPoints/hyperswitch/Provider/ProviderHelper.res index 2b77f3d3e..1618d9dbd 100644 --- a/src/entryPoints/hyperswitch/Provider/ProviderHelper.res +++ b/src/entryPoints/hyperswitch/Provider/ProviderHelper.res @@ -47,18 +47,6 @@ let itemToObjMapperForGetInfo = dict => { } } -let getDefaultValueOfGetInfo = { - module_: "", - description: "", - permissions: [ - { - enum_name: "", - description: "", - isPermissionAllowed: false, - }, - ], -} - let getDefaultValueOfEnum = { { enum_name: "", diff --git a/src/entryPoints/hyperswitch/Provider/ProviderTypes.res b/src/entryPoints/hyperswitch/Provider/ProviderTypes.res index 8bddb58da..8d04f0306 100644 --- a/src/entryPoints/hyperswitch/Provider/ProviderTypes.res +++ b/src/entryPoints/hyperswitch/Provider/ProviderTypes.res @@ -38,8 +38,6 @@ type contextType = { setShowFeedbackModal: (bool => bool) => unit, showProdIntentForm: bool, setShowProdIntentForm: (bool => bool) => unit, - tabIndexForDevelopers: int, - setTabIndexForDevelopers: (int => int) => unit, dashboardPageState: dashboardPageStateTypes, setDashboardPageState: (dashboardPageStateTypes => dashboardPageStateTypes) => unit, integrationDetails: integrationDetailsType,