Files
ruff/.github/key-value-store.json
Zanie Blueandzaniebot a1af728f18 Authorize report publishing and reviewer selection (#29617)
Authorize report publishing and reviewer selection through
`.github/key-value-store.json` and `.github/secure-token-service.json`,
which the services read from `main`.

The four report workflows receive KV `read` and `write` access in
`pull-request` scope and STS `actions: read` and `pull_requests: write`
permissions for `pull_request` runs through the publisher on `main`.
`pull-request-reviewers.yml` receives KV `read` and `write` access in
`workflow` scope and STS `pull_requests: write` permission for
`workflow_dispatch` runs on `main`. All of these new grants require the
`automations` environment; none allow KV `delete`.

---------

Co-authored-by: zaniebot <242828183+zaniebot@users.noreply.github.com>
2026-10-22 05:15:46 +00:00

46 lines
1.7 KiB
JSON

{
"version": 1,
"rules": [
{
"on": ["workflow_dispatch"],
"caller_workflow": "pull-request-reviewers.yml",
"caller_ref": "refs/heads/main",
"environment": "automations",
"reusable_workflow": "astral-sh/ruff/.github/workflows/pull-request-reviewers.yml@refs/heads/main",
"permissions": { "workflow": ["read", "write"] }
},
{
"on": ["pull_request"],
"caller_workflow": "ci.yaml",
"caller_ref": "refs/pull/*/merge",
"environment": "automations",
"reusable_workflow": "astral-sh/ruff/.github/workflows/publish-pull-request-report.yml@refs/heads/main",
"permissions": { "pull-request": ["read", "write"] }
},
{
"on": ["pull_request"],
"caller_workflow": "memory_report.yaml",
"caller_ref": "refs/pull/*/merge",
"environment": "automations",
"reusable_workflow": "astral-sh/ruff/.github/workflows/publish-pull-request-report.yml@refs/heads/main",
"permissions": { "pull-request": ["read", "write"] }
},
{
"on": ["pull_request"],
"caller_workflow": "typing_conformance.yaml",
"caller_ref": "refs/pull/*/merge",
"environment": "automations",
"reusable_workflow": "astral-sh/ruff/.github/workflows/publish-pull-request-report.yml@refs/heads/main",
"permissions": { "pull-request": ["read", "write"] }
},
{
"on": ["pull_request"],
"caller_workflow": "ty-ecosystem-analyzer.yaml",
"caller_ref": "refs/pull/*/merge",
"environment": "automations",
"reusable_workflow": "astral-sh/ruff/.github/workflows/publish-pull-request-report.yml@refs/heads/main",
"permissions": { "pull-request": ["read", "write"] }
}
]
}