Draft
fix: switch content-moderation workflow to pull_request_target trigger#45495
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Investigate content moderation regression from 100% to 25% success
fix: switch content-moderation workflow to pull_request_target trigger
Jul 14, 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.
The Content Moderation workflow regressed from 100% → 25% success (Jul 8→13) not due to a code change, but a volume spike: 8+ copilot-swe-agent PRs on Jul 13 triggered GitHub's platform-level
action_requiredstate (0 jobs run) forpull_requestevents from bot actors. Jul 8 had only human-triggered events, masking this behavior.Changes
.github/workflows/content-moderation.ymlpull_request→pull_request_target, which runs in the base-branch context and bypasses fork/bot PR approval gates. Safe here because the workflow never checks out PR code — it only calls the GitHub REST API.context.eventNamechecks in the GitHub Script to match either event name for forward/backward compatibility: