fix(ci): pr triage permission (#1619)

This commit is contained in:
Rin
2026-04-11 01:03:03 +08:00
committed by GitHub
parent adcfcd9399
commit 4e1946da43
3 changed files with 51 additions and 95 deletions
+29
View File
@@ -0,0 +1,29 @@
name: PR Triage Dispatch
on:
pull_request_target:
types: [opened, reopened, ready_for_review]
permissions:
actions: write
contents: read
jobs:
dispatch:
name: Dispatch PR Triage
runs-on: ubuntu-latest
if: ${{ !github.event.pull_request.draft || github.event.action == 'ready_for_review' }}
steps:
- name: Dispatch agentic triage workflow
uses: actions/github-script@v8
with:
script: |
await github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'pr-triage.lock.yml',
ref: context.payload.repository.default_branch,
inputs: {
pull_request_number: String(context.payload.pull_request.number),
},
});