Skip to content

Commit

Permalink
[pr] enforce tag prefixes on pull requests (#31861)
Browse files Browse the repository at this point in the history
...
<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->
  • Loading branch information
ctiller committed Mar 28, 2023
1 parent 2b97208 commit ed38592
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
16 changes: 16 additions & 0 deletions .github/pr_title_checker_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"LABEL": {
"name": "title needs formatting",
"color": "EEEEEE"
},
"CHECKS": {
"regexp": "^((\\[[^\\]]+\\])+|Revert|Automated fix for) ",
"regexpFlags": "i",
"ignoreLabels": []
},
"MESSAGES": {
"success": "All OK",
"failure": "Incorrect PR title",
"notice": ""
}
}
1 change: 0 additions & 1 deletion .github/workflows/pr-auto-tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ jobs:
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
sync-labels: ""

20 changes: 20 additions & 0 deletions .github/workflows/pr-check-title.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: PR CheckTitle
on:
pull_request_target:
types: [opened, reopened, synchronized, edited, labeled, unlabeled]
permissions:
contents: read

jobs:
title-check:
permissions:
contents: read
pull-requests: write

runs-on: ubuntu-latest
steps:
- uses: thehanimo/pr-title-checker@v1.3.5
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
pass_on_octokit_error: false
configuration_path: ".github/pr_title_checker_config.json"

0 comments on commit ed38592

Please sign in to comment.