chore: add vouch trust management system

This commit is contained in:
Tony
2026-04-16 07:11:37 +08:00
parent 8fe52b1173
commit ecffcd3d95
5 changed files with 180 additions and 2 deletions
+23
View File
@@ -36,6 +36,29 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
trigger: '/wip'
vouch-manage:
name: Vouch Manage
if: ${{ startsWith(github.event.comment.body, 'vouch') || startsWith(github.event.comment.body, 'unvouch') || startsWith(github.event.comment.body, 'denounce') }}
runs-on: ubuntu-slim
timeout-minutes: 5
permissions:
contents: write
issues: write
pull-requests: read
concurrency:
group: vouch-manage
cancel-in-progress: false
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: mitchellh/vouch/action/manage-by-issue@c6d80ead49839655b61b422700b7a3bc9d0804a9 # v1.4.2
with:
issue-id: ${{ github.event.issue.number }}
comment-id: ${{ github.event.comment.id }}
roles: admin,maintain,write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
test-on-demand:
name: Test route on demand
if: startsWith(github.event.comment.body, '/test')
+20
View File
@@ -68,3 +68,23 @@ jobs:
- uses: actions/labeler@634933edcd8ababfe52f92936142cc22ac488b1b # v6.0.1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
vouch-check-pr:
name: Vouch check PR
if: ${{ github.event_name == 'pull_request_target' && github.event.action == 'opened' && github.repository == 'DIYgod/RSSHub' }}
permissions:
contents: read
issues: write
pull-requests: write
runs-on: ubuntu-slim
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Check if PR author is denounced
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
script: |
const { default: checkPr } = await import('${{ github.workspace }}/scripts/workflow/vouch/check-pr.mjs')
await checkPr({ github, context, core })