Skip to content

Commit

Permalink
chore: update requirements to the commit messages and branch naming
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitriidenisenko committed Jun 5, 2024
1 parent d34a3f0 commit e47b305
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/check-commit-message.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ jobs :
- name : Check Commit Type
uses : gsactions/commit-message-checker@v2
with :
pattern : '^(feat|fix|docs|style|refactor|perf|test|chore|build)(.+?)?: .+'
pattern : '^(feat|fix|docs|style|refactor|perf|test|chore|build|ci)(.+?)?: .+'
flags : 'gm'
error : 'Your commit title did not follow semantic versioning. Please see https://github.com/IQKV/.github/blob/dev/SEMANTIC_COMMITS.md'
- name : Check Line Length
uses : gsactions/commit-message-checker@v2
with :
pattern : '^.{8,180}$'
error : 'The maximum line length of 180 characters is exceeded.'
pattern : '^.{6,220}$'
error : 'The maximum line length of 220 characters is exceeded.'
excludeDescription : 'true' # this excludes the description body of a pull request
excludeTitle : 'false'
checkAllCommitMessages : 'false'
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/check-pr-title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs :
steps :
- uses : deepakputhraya/action-pr-title@master
with :
regex : '^(feat|fix|docs|style|refactor|perf|test|chore|build)(.+?)?: .+' # Regex the title should match.
allowed_prefixes : 'feat,fix,docs,style,refactor,perf,test,chore,build' # title should start with the given prefix
prefix_case_sensitive : true # title prefix are case insensitive
min_length : 8 # Min length of the title
max_length : 180 # Max length of the title
regex : '^(feat|fix|docs|style|refactor|perf|test|chore|build|ci)(.+?)?: .+' # Regex the title should match.
allowed_prefixes : 'feat,fix,docs,style,refactor,perf,test,chore,build,ci' # title should start with the given prefix
prefix_case_sensitive : true
min_length : 6
max_length : 220
github_token : ${{ github.token }} # Default: ${{ github.token }}
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ if [[ ! $current_branch =~ $valid_branch_names ]]; then
exit 1
fi

valid_commit="^(feat|fix|docs|style|refactor|perf|test|chore|build)(.+?)?: .+"
valid_commit="^(feat|fix|docs|style|refactor|perf|test|chore|build|ci)(.+?)?: .+"
if [[ ! $1 =~ $valid_commit ]]; then
echo -e "\033[1;31m[ERROR] Your commit title did not follow semantic versioning.\033[0m"
exit 1
Expand Down

0 comments on commit e47b305

Please sign in to comment.