.github: gate PRs via mitchellh/vouch

Auto-close PRs from authors not listed in .github/VOUCHED.td. Issues
stay open to everyone; the close message points contributors at
CONTRIBUTING.md. Maintainers manage the list with !vouch, !denounce
and !unvouch comments, and a weekly job resyncs CODEOWNERS.

The workflows use GITHUB_TOKEN with explicit least-privilege
permissions.
This commit is contained in:
Juan Font
2026-09-25 13:59:48 +00:00
committed by Kristoffer Dalby
parent 731b0b963c
commit c5dc3d4385
6 changed files with 233 additions and 9 deletions
+25
View File
@@ -0,0 +1,25 @@
name: "Vouch - Check PR"
on:
pull_request_target:
types: [opened, reopened]
permissions:
contents: read
pull-requests: write
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
sparse-checkout: .github/pr-unvouched-message
- uses: mitchellh/vouch/action/check-pr@d66fa29a64600490892131ad87597c30c91fcac4 # v1.5.0
with:
pr-number: ${{ github.event.pull_request.number }}
auto-close: true
template-file: .github/pr-unvouched-message
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,33 @@
name: "Vouch - Manage by Issue"
on:
issue_comment:
types: [created]
permissions:
contents: write
issues: write
pull-requests: write
concurrency:
group: vouch-manage
cancel-in-progress: false
jobs:
manage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: mitchellh/vouch/action/manage-by-issue@d66fa29a64600490892131ad87597c30c91fcac4 # v1.5.0
with:
repo: ${{ github.repository }}
issue-id: ${{ github.event.issue.number }}
comment-id: ${{ github.event.comment.id }}
vouch-keyword: "!vouch"
denounce-keyword: "!denounce"
unvouch-keyword: "!unvouch"
pull-request: "true"
merge-immediately: "true"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,28 @@
name: "Vouch - Sync CODEOWNERS"
on:
schedule:
- cron: "0 0 * * 1"
workflow_dispatch:
permissions:
contents: write
pull-requests: write
concurrency:
group: vouch-manage
cancel-in-progress: false
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: mitchellh/vouch/action/sync-codeowners@d66fa29a64600490892131ad87597c30c91fcac4 # v1.5.0
with:
repo: ${{ github.repository }}
pull-request: "true"
merge-immediately: "true"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}