-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ARCO-281): add action to check PR title
- Loading branch information
1 parent
5a12aea
commit 5176a6a
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Enforce Commit Message Format | ||
|
||
on: | ||
pull_request: | ||
types: [opened, reopened, edited, synchronize] | ||
|
||
jobs: | ||
check_commit_message: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check commit message format | ||
env: | ||
PR_TITLE: ${{ github.event.pull_request.title }} | ||
run: | | ||
if [[ ! "$PR_TITLE" =~ ^(feat|fix|docs|style|refactor|test|chore)(\\([a-zA-Z]+\\))?:\ .+$ ]]; then | ||
echo "PR title which is used as merge commit does not follow Conventional Commits format." | ||
echo "Please use format: <type>(<scope>): <description> described int CONTRIBUTING.md" | ||
exit 1 | ||
fi |