Skip to content

Commit 5dbaa5e

Browse files
committed
chore(ci): add a PR title check workflow
To make our commit messages more consistent, adds a PR check without enforcing Jira tickets being included for the time being.
1 parent 4de743d commit 5dbaa5e

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.github/workflows/check-pr-title.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: "Check PR Title"
2+
on:
3+
pull_request:
4+
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled, converted_to_draft, edited]
5+
6+
permissions:
7+
pull-requests: read # to read PR title and labels
8+
9+
jobs:
10+
check-pr-title:
11+
name: Check PR Title
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Enforce conventional commit style
15+
uses: realm/ci-actions/title-checker@d6cc8f067474759d38e6d24e272027b4c88bc0a9
16+
with:
17+
regex: '^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test|ops){1}(\([\w\-\.]+\))?(!)?: .*'
18+
error-hint: 'Invalid PR title. Make sure it follows the conventional commit specification (i.e. "<type>(<optional scope>): <description>") or add the no-title-validation label'
19+
ignore-labels: "no-title-validation"
20+

0 commit comments

Comments
 (0)