Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: commit-msg file changes & README.md file updated. #65

Merged
merged 5 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .githooks/commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ env-config.js
yarn.lock
#package-lock.json
user_data.sh
*.pem
*.pem
.bsb.lock
72 changes: 72 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

`<type>(<subject>): <description>`

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: <subject> - <description>`

### 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 <GPG_KEY_ID>
Replace <GPG_KEY_ID> 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 <GPG_KEY_ID>
```

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
Expand Down
2 changes: 1 addition & 1 deletion src/entryPoints/hyperswitch/EntryPointUtils.res
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 0 additions & 10 deletions src/entryPoints/hyperswitch/Provider/GlobalProvider.res
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ let defaultValue = {
setShowProdIntentForm: _ => (),
integrationDetails: defaultIntegrationValue,
setIntegrationDetails: _ => (),
tabIndexForDevelopers: 0,
setTabIndexForDevelopers: _ => (),
dashboardPageState: #DEFAULT,
setDashboardPageState: _ => (),
permissionInfo: [],
Expand All @@ -23,19 +21,13 @@ let defaultValue = {
let defaultContext = React.createContext(defaultValue)

module Provider = {
let makeProps = (~value, ~children, ()) =>
{
"value": value,
"children": children,
}
let make = React.Context.provider(defaultContext)
}

@react.component
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)
Expand All @@ -56,8 +48,6 @@ let make = (~children) => {
integrationDetails,
showProdIntentForm,
setShowProdIntentForm,
tabIndexForDevelopers,
setTabIndexForDevelopers,
dashboardPageState,
setDashboardPageState,
permissionInfo,
Expand Down
12 changes: 0 additions & 12 deletions src/entryPoints/hyperswitch/Provider/ProviderHelper.res
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,6 @@ let itemToObjMapperForGetInfo = dict => {
}
}

let getDefaultValueOfGetInfo = {
module_: "",
description: "",
permissions: [
{
enum_name: "",
description: "",
isPermissionAllowed: false,
},
],
}

let getDefaultValueOfEnum = {
{
enum_name: "",
Expand Down
2 changes: 0 additions & 2 deletions src/entryPoints/hyperswitch/Provider/ProviderTypes.res
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down