Skip to content

Commit

Permalink
Merge branch 'main' of github.com:juspay/hyperswitch-web into 204-div…
Browse files Browse the repository at this point in the history
…ide-the-disablesavecards-props-into-two-props-for-api-and-checkbox-different
  • Loading branch information
Pritish Budhiraja committed Mar 8, 2024
2 parents e67ddd7 + 3caa69d commit 3b39c9a
Show file tree
Hide file tree
Showing 11 changed files with 185 additions and 27 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/CI-Action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: CI/CD Pipeline

on:
pull_request:
merge_group:
push:
branches:
- main
Expand All @@ -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;
41 changes: 41 additions & 0 deletions .github/workflows/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
## Type of Change

<!-- Put an `x` in the boxes that apply -->

- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD

## Description

<!-- Describe your changes in detail -->

## Motivation and Context

<!--
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.
If you don't have an issue, we'd recommend starting with one first so the PR
can focus on the implementation (unless its an obvious bug or documentation fix
that will have little conversation).
-->

## How did you test it?

<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->

## Checklist

<!-- Put an `x` in the boxes that apply -->

- [ ] I ran `npm run re:build`
- [ ] I reviewed submitted code
- [ ] I added unit tests for my changes where possible
86 changes: 86 additions & 0 deletions .github/workflows/conventional-commit-check.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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 }}
28 changes: 28 additions & 0 deletions .github/workflows/pr-title-spell-check.yml
Original file line number Diff line number Diff line change
@@ -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
22 changes: 3 additions & 19 deletions .husky/prepare-commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -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 {} +
Expand All @@ -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/* //')
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)


Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "orca-payment-page",
"version": "0.27.2",
"version": "0.27.4",
"main": "index.js",
"private": true,
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion public/icons/orca.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/PaymentDetails.res
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ let details = [
},
{
type_: "boleto",
icon: Some(icon("boleto", ~size=19)),
icon: Some(icon("boleto", ~size=21)),
displayName: "Boleto",
},
]
2 changes: 1 addition & 1 deletion src/Payments/PaymentMethodsRecord.res
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ let paymentMethodsFields = [
},
{
paymentMethodName: "boleto",
icon: Some(icon("boleto", ~size=19, ~width=25)),
icon: Some(icon("boleto", ~size=21, ~width=25)),
displayName: "Boleto",
fields: [InfoElement],
miniIcon: None,
Expand Down

0 comments on commit 3b39c9a

Please sign in to comment.