mirror of
https://github.com/slsa-framework/slsa-verifier.git
synced 2026-02-14 17:49:58 +00:00
ci: add pr workflow to check pr title format (#372)
* ci: add pr workflow to check pr title format Signed-off-by: Asra Ali <asraa@google.com>
This commit is contained in:
14
.github/pr-title-checker-config.json
vendored
Normal file
14
.github/pr-title-checker-config.json
vendored
Normal file
@@ -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
.github/workflows/pr-title.yml
vendored
Normal file
14
.github/workflows/pr-title.yml
vendored
Normal file
@@ -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"
|
||||
Reference in New Issue
Block a user