Skip to content

fix: inline permission check in allow-ci job - #560

Merged
sini merged 1 commit into
denful:mainfrom
sini:fix/ci-allow-ci-permission
May 19, 2026
Merged

sini merged 1 commit into
denful:mainfrom
sini:fix/ci-allow-ci-permission

Conversation

@sini

@sini sini commented May 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Root cause: auto-allow-ci adds the allow-ci label via GITHUB_TOKEN, but actions using GITHUB_TOKEN do not trigger new workflow runs. The labeled event never fires for test.yml, so allow-ci is always skipped on the first (and only) run.
  • Fix: Inline the collaborator permission check directly into the allow-ci job. When the label isn't present, the job checks collaborators/{user}/permission via the API. The label is kept as a fast-path and manual override for external contributor PRs.

Behavior matrix

Context Result
Push to main Step skipped, job succeeds
PR with allow-ci label Step skipped, job succeeds
PR without label, author has write/admin Step runs, permission passes, job succeeds
PR without label, external contributor Step runs, permission fails, downstream blocked

Test plan

  • Open a collaborator PR without manually adding label → template checks should run
  • Verify allow-ci label still works as manual override

auto-allow-ci adds the allow-ci label via GITHUB_TOKEN, but actions
using GITHUB_TOKEN do not trigger new workflow runs. The label is
present on the PR but test.yml only sees the initial opened event
where the label doesn't exist yet, so allow-ci was always skipped.

Inline the collaborator permission check directly into the allow-ci
job. Label kept as fast-path for manual overrides on external PRs.
@github-actions github-actions Bot added the allow-ci allow all CI integration tests label May 19, 2026
@sini

sini commented May 19, 2026

Copy link
Copy Markdown
Collaborator Author

Can't test this not on main... so just going to merge it.

@sini
sini merged commit ec25bb9 into denful:main May 19, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

allow-ci allow all CI integration tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant