Chore: Change the PR title check to use conventional commits (#28358)

Co-authored-by: Diego Sampaio <chinello@gmail.com>
This commit is contained in:
Guilherme Gazzo 2023-03-10 14:27:22 -03:00 committed by GitHub
parent c862fea8fb
commit b70074bac2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 4 deletions

View File

@ -4,7 +4,10 @@
"color": "B60205"
},
"CHECKS": {
"regexp": "^(?:(?:\\[(NEW|BREAK|IMPROVE|FIX)\\](\\[(ENTERPRISE|APPS)\\])?|(?:Regression|Chore|Revert|i18n):)|(?:Bump)) .+$|^Release [0-9]+\\.[0-9]+\\.[0-9]+$|^Merge master into develop",
"ignoreLabels" : ["[ignore-title]"]
"regexp": "(feat|fix|ci|chore|docs|test|refactor|i18n|regression|revert)(\\([^\\)]+\\))?\\!?: .{1,}$|(?:Bump .+)$|^Release [0-9]+\\.[0-9]+\\.[0-9]+$|^Merge master into develop",
"ignoreLabels": ["[ignore-title]"]
},
"MESSAGES": {
"failure": "Invalid PR title. Please use one of the following formats: 'feat: add new feature', 'fix: fix a bug', 'ci: update CI configuration', 'chore: update dependencies', 'docs: update documentation', 'test: add tests', 'refactor: refactor code', 'i18n: update translations', 'regression: fix a regression'.\nFor more info please check [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/)."
}
}

View File

@ -1,12 +1,17 @@
name: 'PR Title Checker'
on:
pull_request_target:
types: [opened, edited]
types:
- opened
- edited
- synchronize
- labeled
- unlabeled
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: thehanimo/pr-title-checker@v1.3.6
- uses: thehanimo/pr-title-checker@v1.3.7
with:
GITHUB_TOKEN: ${{ secrets.RC_TITLE_CHECKER }}