Skip to content

fix: switch content-moderation workflow to pull_request_target trigger#45495

Draft
pelikhan with Copilot wants to merge 2 commits into
mainfrom
copilot/aw-content-moderation-regression
Draft

fix: switch content-moderation workflow to pull_request_target trigger#45495
pelikhan with Copilot wants to merge 2 commits into
mainfrom
copilot/aw-content-moderation-regression

Conversation

Copilot AI commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

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_required state (0 jobs run) for pull_request events from bot actors. Jul 8 had only human-triggered events, masking this behavior.

Changes

  • .github/workflows/content-moderation.yml
    • Trigger: pull_requestpull_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.
    • Updated both context.eventName checks in the GitHub Script to match either event name for forward/backward compatibility:
      // before
      } else if (context.eventName === 'pull_request') {
      // after
      } else if (context.eventName === 'pull_request' || context.eventName === 'pull_request_target') {

Note: Same-repo copilot/* branch PRs may still hit action_required if the org has an approval policy for the Copilot GitHub App — that requires an org-level policy change, not a workflow fix.

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
Copilot AI requested a review from pelikhan July 14, 2026 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[aw] Content Moderation: regression from 100% → 25% success (Jul 8→13)

2 participants