Skip to content

Commit

Permalink
fix: fix PR commits
Browse files Browse the repository at this point in the history
  • Loading branch information
pawellewandowski98 committed Nov 8, 2024
1 parent b93d5db commit 96af7cb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr-title-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: |
if [[ ! "$PR_TITLE" =~ ^(feat|chore|sec|fix|refactor|docs|build|ci|test)(\([A-Z]{3,6}-[0-9]{3,6}\))?:\ .+$ ]]; then
if [[ ! "$PR_TITLE" =~ ^(feat|chore|deps|sec|fix|refactor|docs|build|ci|test)(\([A-Z]{3,6}-[0-9]{3,6}\))?:\ .+$ ]]; then
echo "PR title which is used as merge commit does not follow Conventional Commits format."
echo "Please use format: <type>(<scope>): <description> as described in CONTRIBUTING.md"
exit 1
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ repos:
rev: v0.2.2
hooks:
- id: commit-msg-regex-hook
args: [ "--pattern='^(feat|chore|sec|fix|refactor|docs|build|ci|test)(\\([A-Z]{3,6}-[0-9]{3,6}\\))?: .+$'",
args: [ "--pattern='^(feat|chore|deps|sec|fix|refactor|docs|build|ci|test)(\\([A-Z]{3,6}-[0-9]{3,6}\\))?: .+$'",
"--failure_message='Commits should match the pattern: <type>(CODE-XXX)?: Message, where <type> is one of feat, sec, fix, refactor, docs, build, ci, and (CODE-XXX) is optional.'" ]
stages: [ commit-msg ]
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ Where:
```
deps -> dependency update
feat -> new feature
chore -> updating grunt tasks, no production code change
test -> changes associated with the tests
sec -> security update
fix -> bug fixes
refactor -> refactor commits
Expand Down

0 comments on commit 96af7cb

Please sign in to comment.