Skip to content

ci: split PR labeling into signal and receiver workflows - #8677

Merged
Xuanwo merged 1 commit into
mainfrom
xuanwo/secure-label-workflow
Nov 22, 2026
Merged

Xuanwo merged 1 commit into
mainfrom
xuanwo/secure-label-workflow

Conversation

@Xuanwo

@Xuanwo Xuanwo commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Which issue does this PR close?

Refs #5502

Rationale for this change

PR activity currently starts the labeler through pull_request_target. Separate that signal from the job that has the Cloudflare credentials and can write labels.

What changes are included in this PR?

  • Run a permissionless pull_request signal and receive its successful completions on the default branch. The signal runs a single no-op step and produces no artifacts.
  • Resolve the PR through GitHub's API with a read-only token. When GitHub omits the attached PR, require exactly one open PR matching the triggering head repository, branch, and SHA. Recheck the live PR before inference and before updating labels.
  • Keep the Cloudflare credentials in the classification step and serialize label updates by issue or PR number. Run catalog synchronization in its own concurrency group.

For the resolver, I checked real GitHub run metadata and live PR API responses for fork PR #8659 and same-repository PR #8674, substituting the new signal workflow path in the saved run records. GitHub uses the default-branch receiver, so the full signal-to-receiver chain can first be observed after this change lands. The repository's high-confidence zizmor scan passes. Its broader trigger audit flags every workflow_run trigger at medium confidence.

Are there any user-facing changes?

GitHub can delay PR labeling until merge conflicts are resolved or first-time fork workflows are approved. .github/LABELS.md documents those cases and the resolver commands.

Breaking changes

AI Usage Statement

  • Pi, codex/gpt-6.2-astra, high — audited the workflow split and verified the fork run metadata used to design resolution.
  • Pi, agy-cli/gemini-4-neon, high — scoped the change and set the implementation and verification criteria.
  • Pi, codex/gpt-6.2-sol, xhigh — implemented the workflows, resolver, tests, and documentation, and verified the resolver against GitHub's API.
  • Pi, magpie/devin/swe-2, max — applied the round-1 review fix (restored pull-requests: write on the classify job, which the Issues REST label endpoint requires for PRs) and rebased onto main past ci: pin third-party GitHub Actions to commit SHAs #8671 and fix(ci): migrate label classification to Qwen 3.8 #8674.

@Xuanwo
Xuanwo requested a review from tisonkun as a code owner November 22, 2026 18:28
@Xuanwo
Xuanwo force-pushed the xuanwo/secure-label-workflow branch from 8644fa7 to f57d841 Compare November 22, 2026 19:53
@github-actions github-actions Bot added releases-note/ci The PR modifies CI-related content or has a title that begins with "ci" size:XL This PR changes 500-999 lines, ignoring generated files. labels Nov 22, 2026
@Xuanwo
Xuanwo merged commit d00a9e5 into main Nov 22, 2026
27 checks passed
@Xuanwo
Xuanwo deleted the xuanwo/secure-label-workflow branch November 22, 2026 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

releases-note/ci The PR modifies CI-related content or has a title that begins with "ci" size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants