Skip to content

Commit

Permalink
Adding pr-checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Miguel Arias authored and Miguel Arias committed Dec 7, 2023
1 parent e22545b commit 42bc933
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pr-validator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
const payload = context.payload
const prTitle = payload.pull_request.title
// The pattern for JIRA ticket format
const jiraPattern = /[A-Z]+-\d+/g
const jiraPattern = /([A-Z]+-\d+)|(breakglass)/gi;
if (!jiraPattern.test(prTitle)) {
console.log('The PR title does not match JIRA ticket format!')
// Fails the workflow
core.setFailed('PR title does not match JIRA ticket format!')
} else {
console.log('PR title format is correct.')
}
}

0 comments on commit 42bc933

Please sign in to comment.