Skip to content

Commit

Permalink
ci: add pr title checker (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
daviderli614 authored Sep 9, 2024
1 parent d054e6d commit e3578dc
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
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": "Invalid PR Title",
"color": "B60205"
},
"CHECKS": {
"regexp": "^(feat|fix|test|refactor|chore|style|docs|perf|build|ci|revert)(!)?(\\(.*\\))?:.*",
"ignoreLabels" : ["ignore-title"]
}
}
20 changes: 20 additions & 0 deletions .github/workflows/pr-title-checker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Check PR Title

on:
pull_request_target:
types:
- opened
- edited
- synchronize
- labeled
- unlabeled

jobs:
check-pr-title:
runs-on: ubuntu-22.04
steps:
- uses: thehanimo/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
pass_on_octokit_error: false
configuration_path: ".github/pr-title-checker-config.json"
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,15 @@
# Output of the go coverage tool, specifically when used with LiteIDE
*.out


# Dependency directories (remove the comment below to include it)
# vendor/
.vscode

# editor and IDE paraphernalia
.idea
*.swp
*.swo
*~

# macOS
.DS_Store

0 comments on commit e3578dc

Please sign in to comment.