mirror of
https://github.com/astral-sh/ruff.git
synced 2026-11-21 12:16:15 +08:00
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>
46 lines
1.7 KiB
JSON
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"] }
|
|
}
|
|
]
|
|
}
|