-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add GitHub Action to enforce PR title format
- Loading branch information
1 parent
a294b62
commit 52be015
Showing
4 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"LABEL": { | ||
"name": "" | ||
}, | ||
"CHECKS": { | ||
"NOTE": "You can test the regex here: https://regex101.com/r/nDeps5/1", | ||
"regexp": "(^(?<type>build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test|BREAKING CHANGE)(?<scope>\\([\\w\\s*-]+\\))?(?<breaking_change>!?): (?<body>([a-z]).+[^.|\\s])$)", | ||
"regexpFlags": "gm" | ||
}, | ||
"MESSAGES": { | ||
"success": "All OK", | ||
"failure": "PR title not following the semantic-release guidelines. Please check https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines for more information.", | ||
"notice": "" | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: PR Title Checker | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
types: | ||
- opened | ||
- edited | ||
- synchronize | ||
- labeled | ||
- unlabeled | ||
|
||
jobs: | ||
check-pr-title: | ||
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-config.json #(optional. defaults to .github/pr-title-checker-config.json) |