Skip to content

Commit

Permalink
ci(github): pr parity to include hyphen
Browse files Browse the repository at this point in the history
    Primary Changes
    ----------------
    1. Updated the code to remove the hyphen
       regex from the pr-commit parity script
    2. Removed an unused var from the workflow

Fixes #3557

Signed-off-by: jagpreetsinghsasan <jagpreetsinghsasan@accenture.com>
  • Loading branch information
jagpreetsinghsasan authored and petermetz committed Oct 24, 2024
1 parent 891a705 commit aa0108b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/pr-commit-parity.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
name: PR - Commit Parity
on: [pull_request]

env:
NODEJS_VERSION: v18.18.2

jobs:
pr-commit-parity:
name: PR and Commit messages Parity
Expand Down
3 changes: 0 additions & 3 deletions tools/pr-commit-parity.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ export async function fetchJsonFromUrl(url) {
const PULL_REQ_REQUIREMENTS_REGEX = /\*\*Pull\sRequest\sRequirements(.|\n)*/gim;
const SIGNED_OFF_REGEX = /(")*Signed-off-by:(.|\s)*/gim;
const COMMIT_TITLE_REGEX = /^.*$/m;
const HYPHEN_REGEX = /(-)+/gm;
const BACKTICK_REGEX = /`+/gm;
const COMMIT_TO_BE_REVIEWED_REGEX = /("#*\s*Commit\sto\sbe\sreviewed)/gim;
const HYPERLEDGER_REFERENCE_REGEX = /hyperledger#/gm;
Expand All @@ -80,7 +79,6 @@ commitMessagesMetadata.forEach((commitMessageMetadata) => {
commitMessageList.push(
commitMessageMetadata["commit"]["message"]
.replace(SIGNED_OFF_REGEX, "")
.replace(HYPHEN_REGEX, "")
.replace(BACKTICK_REGEX, "")
.replace(HYPERLEDGER_REFERENCE_REGEX, "#")
.replace(WHITESPACES_HARDCODED_REGEX, "")
Expand All @@ -92,7 +90,6 @@ let prBodyStriped = prBodyRaw
.replace(PULL_REQ_REQUIREMENTS_REGEX, "")
.replace(WHITESPACES_HARDCODED_REGEX, "\n")
.replace(SIGNED_OFF_REGEX, "")
.replace(HYPHEN_REGEX, "")
.replace(BACKTICK_REGEX, "")
.replace(HYPERLEDGER_REFERENCE_REGEX, "#")
.replace(COMMIT_TO_BE_REVIEWED_REGEX, "")
Expand Down

0 comments on commit aa0108b

Please sign in to comment.