[pr] enforce tag prefixes on pull requests (#31861)

...
<!--

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.

-->
pull/32744/head
Craig Tiller 2 years ago committed by GitHub
parent 2b97208ff3
commit ed38592d76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 16
      .github/pr_title_checker_config.json
  2. 1
      .github/workflows/pr-auto-tag.yaml
  3. 20
      .github/workflows/pr-check-title.yaml

@ -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": ""
}
}

@ -17,4 +17,3 @@ jobs:
with: with:
repo-token: "${{ secrets.GITHUB_TOKEN }}" repo-token: "${{ secrets.GITHUB_TOKEN }}"
sync-labels: "" sync-labels: ""

@ -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"
Loading…
Cancel
Save