Skip to content

Commit

Permalink
Feat: add pr title check
Browse files Browse the repository at this point in the history
Signed-off-by: xiaowu.zhu <[email protected]>
  • Loading branch information
yyzxw authored and xiaowu.zhu committed Dec 28, 2023
1 parent b4117dd commit c60fef7
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/pr-title-checker-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"LABEL": {
"name": "title-needs-formatting",
"color": "EEEEEE"
},
"CHECKS": {
"prefixes": ["Fix: ", "Feat: ", "Docs: ", "Test: ", "Chore: ", "CI: ", "Perf: ", "Refactor: ", "Revert: ", "Style: ", "Test: ",
"Fix(", "Feat(", "Docs(", "Test(", "Chore(", "CI(", "Perf(", "Refactor(", "Revert(", "Style(", "Test(", "[Backport"]
}
}
22 changes: 22 additions & 0 deletions .github/workflows/commit-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: PR Title Checker
on:
pull_request:
types:
- opened
- edited
- synchronize
- labeled
- unlabeled

permissions:
pull-requests: read

jobs:
check:
runs-on: ubuntu-22.04
steps:
- uses: thehanimo/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
pass_on_octokit_error: true
configuration_path: ".github/pr-title-checker-config.json"

0 comments on commit c60fef7

Please sign in to comment.