forked from hyperledger-cacti/cacti
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(github): commit parity check based on similarity
Primary Changes --------------- 1. Added a commit-pr similarity ratio to lessen the check strictness 2. Added an env var to the workflow to easily control the similarity ratio Changes required to incorporate 1) --------------------------------- 3. Added string-similarity-js package in package.json Fixes hyperledger-cacti#3470 Signed-off-by: jagpreetsinghsasan <[email protected]>
- Loading branch information
jagpreetsinghsasan
committed
Sep 2, 2024
1 parent
7e7bb44
commit 52a3f86
Showing
4 changed files
with
64 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,15 +11,33 @@ name: PR - Commit Parity | |
- main | ||
- dev | ||
|
||
env: | ||
NODEJS_VERSION: v18.18.2 | ||
|
||
jobs: | ||
pr-commit-parity: | ||
name: PR and Commit messages Parity | ||
runs-on: ubuntu-22.04 | ||
env: | ||
ACCEPTABLE_SIMILARITY_RATIO: 0.9 | ||
steps: | ||
- uses: actions/[email protected] | ||
- name: Use Node.js v18.18.2 | ||
uses: actions/[email protected] | ||
- name: Install Indy SDK | ||
run: > | ||
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CE7709D068DB5E88 \ | ||
&& sudo add-apt-repository "deb https://repo.sovrin.org/sdk/deb bionic stable" \ | ||
&& sudo apt-get update \ | ||
&& sudo apt-get install -y \ | ||
libindy \ | ||
libnullpay \ | ||
libvcx \ | ||
indy-cli \ | ||
&& sudo rm -f /etc/apt/sources.list.d/sovrin.list* | ||
- name: Set up NodeJS ${{ env.NODEJS_VERSION }} | ||
uses: actions/[email protected] | ||
with: | ||
node-version: v18.19.0 | ||
node-version: ${{ env.NODEJS_VERSION }} | ||
- run: npm run configure | ||
|
||
- name: Execute pr-commit-parity script | ||
run: node tools/pr-commit-parity.js ${{ github.event.pull_request.url }} | ||
run: node tools/pr-commit-parity.js ${{ github.event.pull_request.url }} "$ACCEPTABLE_SIMILARITY_RATIO" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters