Skip to content

Commit d20c0e8

Browse files
committed
[TRTLLM-6364][infra] check PR title
1 parent 5636c67 commit d20c0e8

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/precommit-check.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,25 @@ jobs:
4141
- name: Run pre-commit checks
4242
run: |
4343
python3 -u scripts/release_check.py
44+
check-pr-title:
45+
name: Check PR Title
46+
runs-on: ubuntu-latest
47+
steps:
48+
- name: Check PR title
49+
id: check-pr-title
50+
continue-on-error: true
51+
with:
52+
pr-title-regex: "^(\\[(None|[A-Z]+-[0-9]+|#[0-9]+|https:\\/\\/nvbugs\\/[0-9]+)\\])(\\[[a-z0-9]+\\]) (([^ ].*)?[^ ])$"
53+
pr-body-regex: ""
54+
uses: agenthunt/[email protected]
55+
- name: PR title format
56+
if: steps.check-pr-title.outcome == 'failure'
57+
run: |
58+
echo "PR title format check failed"
59+
echo "PR title format:"
60+
echo "[JIRA ticket(JIRA-1234)/NVBugs ID(https://nvbugs/1234)/GitHub issue(#1234)][fix/feat/doc/infra/...] <summary of this PR>"
61+
echo "e.g. [JIRA-1234][fix] some summary"
62+
echo "e.g. [https://nvbugs/1234][feat] some summary"
63+
echo "e.g. [#1234][doc] some summary"
64+
echo "e.g. [None][fix] some summary"
65+
exit 1

0 commit comments

Comments
 (0)