Repository navigation
Migrate PR labeler away from pull_request_target - #785
Merged
Merged
Conversation
Separate an unprivileged pull_request signal from an API-only workflow_run labeler. Preserve synchronized labels and fork attribution without executing PR code or consuming artifacts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 24ed5201-8ade-4f13-8cf5-4edb5c0fca3c
tracyboehrer (tracyboehrer)
enabled auto-merge
October 28, 2026 15:55
Matthew (matthewmeyer)
approved these changes
Oct 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Remove the repository's remaining
pull_request_targettrigger before GitHub begins enforcing the default blocking policy on December 2, 2026. This migration does not require an event-policy exception.Changes
pull_requestsignal with no token permissions, covering opened, synchronized, and reopened PRs on all target branches.workflow_run, with write permissions scoped to the labeling job.From Fork, including when workflow metadata omits the PR association.Validation by Copilot
actionlintv1.7.12 passed for both changed workflows;git diff --checkpassed.mainPR Add Discord support via a custom ChannelAdapter reusing the shared WeatherAgent #670. Validation did not modify those PRs.pull_request_targettriggers remain under.github/workflows.Operational notes
The privileged
workflow_rundefinition is loaded from the default branch, so the migrated end-to-end path activates after merge. A same-repository/fork labeling smoke test should follow merge. The signal follows GitHub's normalpull_requestmergeability and approval rules.Current credentials could not access Actions policy settings/insights (settings returned HTTP 403; the policy endpoint returned HTTP 404). Recent workflow runs confirmed that the existing labeler is active. No repository policies were changed.
Reference: GitHub's default policy and migration guidance.