Skip to content

Commit 5d3bfa9

Browse files
committed
EINT-26 Enforce PR title to contain ticket ID
1 parent 19da876 commit 5d3bfa9

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: check-pr-title
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
- develop
8+
9+
jobs:
10+
check-title:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Validate PR title
14+
run: |
15+
TITLE="${{ github.event.pull_request.title }}"
16+
echo "PR Title: $TITLE"
17+
if [[ ! "$TITLE" =~ [A-Z]+-[0-9]+ ]]; then
18+
echo "❌ PR title must include a ticket ID (e.g. PROJ-123)"
19+
exit 1
20+
fi

0 commit comments

Comments
 (0)