Skip to content

Commit

Permalink
Merge pull request #336 from harmeetsingh11/feature/pr-title-checker-…
Browse files Browse the repository at this point in the history
…workflow/issue-333

feat: add PR title checker workflow
  • Loading branch information
shelcia authored Feb 1, 2024
2 parents 290fd18 + 533107f commit 439c0ba
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/pr-title-checker.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"LABEL": {
"name": "title needs formatting",
"color": "F9D0C4"
},
"CHECKS": {
"prefixes": [
"build: ",
"chore: ",
"docs: ",
"feat: ",
"fix: ",
"perf: ",
"refactor: ",
"revert: ",
"style: ",
"test: "
]
},
"MESSAGES": {
"success": "Everything is great. Status: 200",
"failure": "PR title does not conform to the required format. Please use one of the specified prefixes followed by a colon and a space. Status: 400",
"notice": ""
}
}
19 changes: 19 additions & 0 deletions .github/workflows/pr-title-checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: 'PR Title Checker'
on:
pull_request_target:
types:
- opened
- edited
- synchronize
- labeled
- unlabeled

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

0 comments on commit 439c0ba

Please sign in to comment.