Skip to content

Commit

Permalink
feat(ARCO-281): add action to check PR title
Browse files Browse the repository at this point in the history
  • Loading branch information
pawellewandowski98 committed Nov 7, 2024
1 parent 5a12aea commit 5176a6a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/pr-title-check.yml
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

0 comments on commit 5176a6a

Please sign in to comment.