Skip to content

Commit 1fed318

Browse files
committed
[TRTLLM-6364][infra] check PR title
Signed-off-by: Yiteng Niu <[email protected]>
1 parent 5636c67 commit 1fed318

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/pr-check.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
name: PR Checks
17+
on:
18+
pull_request:
19+
types: [opened, edited, synchronize]
20+
jobs:
21+
check-pr-title:
22+
name: Check PR Title
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Check PR title
26+
id: check-pr-title
27+
continue-on-error: true
28+
with:
29+
pr-title-regex: "^(\\[(None|[A-Z0-9]+-[0-9]+|#[0-9]+|https:\\/\\/nvbugs\\/[0-9]+)\\])(\\[[a-z0-9]+\\]) (([^ ].*)?[^ ])$"
30+
pr-body-regex: ""
31+
uses: agenthunt/[email protected]
32+
- name: PR title format
33+
if: steps.check-pr-title.outcome == 'failure'
34+
run: |
35+
echo "PR title format check failed"
36+
echo "PR title format:"
37+
echo "[JIRA ticket(JIRA-1234)/NVBugs ID(https://nvbugs/1234)/GitHub issue(#1234)][fix/feat/doc/infra/...] <summary of this PR>"
38+
echo "e.g. [JIRA-1234][fix] some summary"
39+
echo "e.g. [https://nvbugs/1234][feat] some summary"
40+
echo "e.g. [#1234][doc] some summary"
41+
echo "e.g. [None][fix] some summary"
42+
exit 1

0 commit comments

Comments
 (0)