Skip to content

Commit

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

feat: add workflow for PR title checker
  • Loading branch information
JAYESHBATRA authored Jan 20, 2024
2 parents 2411854 + e1d5e4a commit 51c0141
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 51c0141

Please sign in to comment.