diff --git a/.github/workflows/CI-Action.yml b/.github/workflows/CI-Action.yml index fab191d64..c692b7099 100644 --- a/.github/workflows/CI-Action.yml +++ b/.github/workflows/CI-Action.yml @@ -1,6 +1,8 @@ name: CI/CD Pipeline on: + pull_request: + merge_group: push: branches: - main @@ -24,11 +26,14 @@ jobs: - name: Install dependencies run: npm install - - name: Install fast-glob - run: npm install fast-glob - - name: Display Node.js version run: node --version + - name: "Rescript Code Compile" + run: npm run re:build + + - name: "Build" + run: npm run build + - name: npm release run: npx semantic-release --debug; diff --git a/.github/workflows/PULL_REQUEST_TEMPLATE.md b/.github/workflows/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000..c91742e85 --- /dev/null +++ b/.github/workflows/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,41 @@ +## Type of Change + + + +- [ ] Bugfix +- [ ] New feature +- [ ] Enhancement +- [ ] Refactoring +- [ ] Dependency updates +- [ ] Documentation +- [ ] CI/CD + +## Description + + + +## Motivation and Context + + + +## How did you test it? + + + +## Checklist + + + +- [ ] I ran `npm run re:build` +- [ ] I reviewed submitted code +- [ ] I added unit tests for my changes where possible diff --git a/.github/workflows/conventional-commit-check.yml b/.github/workflows/conventional-commit-check.yml new file mode 100644 index 000000000..ad0164206 --- /dev/null +++ b/.github/workflows/conventional-commit-check.yml @@ -0,0 +1,86 @@ +name: Conventional Commit Message Check + +on: + # This is a dangerous event trigger as it causes the workflow to run in the + # context of the target repository. + # Avoid checking out the head of the pull request or building code from the + # pull request whenever this trigger is used. + # Since we only label pull requests, do not have a checkout step in this + # workflow, and restrict permissions on the token, this is an acceptable + # use of this trigger. + pull_request_target: + types: + - opened + - edited + - reopened + - ready_for_review + - synchronize + + merge_group: + types: + - checks_requested + +permissions: + # Reference: https://github.com/cli/cli/issues/6274 + repository-projects: read + pull-requests: write + +env: + # Allow more retries for network requests in cargo (downloading crates) and + # rustup (installing toolchains). This should help to reduce flaky CI failures + # from transient network timeouts or other issues. + CARGO_NET_RETRY: 10 + RUSTUP_MAX_RETRIES: 10 + # Use cargo's sparse index protocol + CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse + +jobs: + pr_title_check: + name: Verify PR title follows conventional commit standards + runs-on: ubuntu-latest + + steps: + - name: Install Rust + uses: dtolnay/rust-toolchain@master + with: + toolchain: stable 2 weeks ago + + - uses: baptiste0928/cargo-install@v2.2.0 + with: + crate: cocogitto + + - name: Verify PR title follows conventional commit standards + id: pr_title_check + if: ${{ github.event_name == 'pull_request_target' }} + shell: bash + env: + TITLE: ${{ github.event.pull_request.title }} + continue-on-error: true + run: cog verify "$TITLE" + + - name: Verify commit message follows conventional commit standards + id: commit_message_check + if: ${{ github.event_name == 'merge_group' }} + shell: bash + # Fail on error, we don't have context about PR information to update labels + continue-on-error: false + run: cog verify '${{ github.event.merge_group.head_commit.message }}' + + # GitHub CLI returns a successful error code even if the PR has the label already attached + - name: Attach 'S-conventions-not-followed' label if PR title check failed + if: ${{ github.event_name == 'pull_request_target' && steps.pr_title_check.outcome == 'failure' }} + shell: bash + env: + GH_TOKEN: ${{ github.token }} + run: | + gh --repo ${{ github.event.repository.full_name }} pr edit --add-label 'S-conventions-not-followed' ${{ github.event.pull_request.number }} + echo "::error::PR title does not follow conventional commit standards" + exit 1 + + # GitHub CLI returns a successful error code even if the PR does not have the label attached + - name: Remove 'S-conventions-not-followed' label if PR title check succeeded + if: ${{ github.event_name == 'pull_request_target' && steps.pr_title_check.outcome == 'success' }} + shell: bash + env: + GH_TOKEN: ${{ github.token }} + run: gh --repo ${{ github.event.repository.full_name }} pr edit --remove-label 'S-conventions-not-followed' ${{ github.event.pull_request.number }} diff --git a/.github/workflows/pr-title-spell-check.yml b/.github/workflows/pr-title-spell-check.yml new file mode 100644 index 000000000..424b18127 --- /dev/null +++ b/.github/workflows/pr-title-spell-check.yml @@ -0,0 +1,28 @@ +name: PR Title Spell Check + +on: + merge_group: + pull_request: + types: + - opened + - edited + - synchronize + +jobs: + typos: + name: Spell check PR title + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Store PR title in a file + shell: bash + env: + TITLE: ${{ github.event.pull_request.title }} + run: echo $TITLE > pr_title.txt + + - name: Spell check + uses: crate-ci/typos@master + with: + files: ./pr_title.txt diff --git a/.husky/prepare-commit-msg b/.husky/prepare-commit-msg index f78a1b8a3..b74e18a25 100755 --- a/.husky/prepare-commit-msg +++ b/.husky/prepare-commit-msg @@ -4,27 +4,11 @@ # This hook triggers Jira input modules. # Helps in maintaining code compatblity. -# JS Code Check -echo "*****~~~~~ Checking ReScript Code ~~~~~~*****" -if (! npm run re:build) -then - echo - echo "*****~~~~~ ReScript Code Compilation Failed! ~~~~~*****" - exit 1 -fi -echo "***** ReScript Code Compiled! *****" +echo "*****~~~~~ Commit hook initiated ~~~~~~*****" -# JS Code Build -echo "*****~~~~~ Checking ReScript Build ~~~~~~*****" -if (! npm run build) -then - echo - echo "*****~~~~~ ReScript Build Completition Failed! ~~~~~*****" - exit 1 -fi -echo "***** ReScript Build Completed! *****" #Trailing Space Check +echo echo "Evaluating for trailing spaces" find . -type f -name '.DS_Store' -exec rm {} + @@ -40,7 +24,7 @@ then echo "Usage of EditorConfig [https://editorconfig.org/#download] plugin is recommended for development " exit 1 fi - +echo echo "Done Evaluating" BRANCH_NAME=$(git branch | grep '*' | sed 's/* //') diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b4032f92..e65c2ec6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,17 @@ +## [0.27.4](https://github.com/juspay/hyperswitch-web/compare/v0.27.3...v0.27.4) (2024-03-08) + + +### Bug Fixes + +* workflow addition & commit time code compile removal ([#208](https://github.com/juspay/hyperswitch-web/issues/208)) ([66bb5a4](https://github.com/juspay/hyperswitch-web/commit/66bb5a48a49c96e2b5212d632ed7634698622144)) + +## [0.27.3](https://github.com/juspay/hyperswitch-web/compare/v0.27.2...v0.27.3) (2024-03-08) + + +### Bug Fixes + +* **boleto:** boleto Icon fill color and size fix ([#210](https://github.com/juspay/hyperswitch-web/issues/210)) ([73ba2d8](https://github.com/juspay/hyperswitch-web/commit/73ba2d8a39edd9a9dc5cd09c62ef9c985fb252c5)) + ## [0.27.2](https://github.com/juspay/hyperswitch-web/compare/v0.27.1...v0.27.2) (2024-03-06) diff --git a/package-lock.json b/package-lock.json index 739580e6c..58004c1c7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "orca-payment-page", - "version": "0.27.2", + "version": "0.27.4", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 2cf72f140..dbdb9ee2e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "orca-payment-page", - "version": "0.27.2", + "version": "0.27.4", "main": "index.js", "private": true, "dependencies": { diff --git a/public/icons/orca.svg b/public/icons/orca.svg index e9146bdb9..d732594ce 100644 --- a/public/icons/orca.svg +++ b/public/icons/orca.svg @@ -2137,7 +2137,7 @@ License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL id="boleto" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 32" - fill="black" + fill="currentColor" >