Skip to content

Commit

Permalink
ci: add pr workflow to check pr title format (#372)
Browse files Browse the repository at this point in the history
* ci: add pr workflow to check pr title format

Signed-off-by: Asra Ali <asraa@google.com>
  • Loading branch information
asraa committed Nov 30, 2022
1 parent 7bebbb9 commit 128324f
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/pr-title-checker-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"LABEL": {
"name": "title needs adjustment",
"color": "EEEEEE"
},
"CHECKS": {
"regexp": "^(fix|feat|break|docs|chore|refactor|style|build|ci|revert|test)!?(\\(.*\\))?!?:.*"
},
"MESSAGES": {
"success": "PR title is valid",
"failure": "PR title is invalid",
"notice": "Title needs to pass regex '^(fix|feat|break|docs|chore|refactor|style|build|ci|revert|test)!?(\\(.*\\))?!?:.*"
}
}
14 changes: 14 additions & 0 deletions .github/workflows/pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: PR Title

on:
pull_request:
types: [opened, edited, reopened, synchronize]

jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: thehanimo/pr-title-checker@e914bff8ab5e6f1a6a270da6954cd6bfd1d7f1fb # v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
configuration_path: ".github/pr-title-checker-config.json"

0 comments on commit 128324f

Please sign in to comment.