Skip to content

Commit

Permalink
feat: add more conventional commit types (#279)
Browse files Browse the repository at this point in the history
  • Loading branch information
hspitzley-czi authored Jul 8, 2024
1 parent 9e055ea commit c212929
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions .github/actions/conventional-commits/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ runs:
- uses: actions/github-script@v5
with:
script: |
const validator = /^(chore|feat|fix|deps|revert|docs|style)(\((((CCIE|CDI|PRODSEC|SECENG|ONCALL)-[0-9]+)|([a-z-]+))\))?(!)?: (.)+$/
const validator = /^(chore|feat|fix|deps|revert|docs|style|test|ci|perf|refactor)(\((((CCIE|CDI|PRODSEC|SECENG|ONCALL)-[0-9]+)|([a-z-]+))\))?(!)?: (.)+$/
const title = context.payload.pull_request.title
const is_valid = validator.test(title)
if (!is_valid) {
const regex = validator.toString()
core.setFailed(`Your pr title doesn't adhere to conventional commits syntax. Start with chore, feat, fix, revert, or docs and add an ! if the change is breaking. Title must satisfy this regex: ${regex}.`)
}
# bump

0 comments on commit c212929

Please sign in to comment.