Replies: 3 comments 2 replies
-
|
This is expected behavior from GitHub Actions, not something specific to Copilot. Copilot PRs are treated like PRs coming from a fork, so GitHub requires someone to click “Approve workflows to run” for security reasons. There isn’t currently a way to disable this only for Copilot. The only option would be to turn off the approval requirement for all forked PRs at the organization level, but that lowers security for every external contribution. So for now, manual approval is required by design. |
Beta Was this translation helpful? Give feedback.
-
|
“Require approval for first-time contributors.” Even though the PR branch is inside the same repository and not from a fork, GitHub evaluates workflow trust based on the actor who authored the PR, not the repository location. PRs created by GitHub Copilot are treated as coming from a separate bot identity, not from you personally. That’s why: The workflow shows “Approve workflows to run” Copilot is still treated as a first-time contributor Manual approval is required again after new commits Approval is scoped per workflow run, not per PR. Every time new commits are pushed and the pull_request event triggers again, GitHub evaluates trust again and requires approval. How to disable manual approval You have three options: Option 1 — Disable the organization requirement (global change)
Option 2 — Use pull_request_target instead of pull_request on: This runs in the context of the base branch and avoids the approval requirement.
Option 3 — Trigger CI on push instead on: This bypasses contributor approval checks entirely. |
Beta Was this translation helpful? Give feedback.
-
|
Practical Recommendation: The manual approval requirement for Copilot PRs is a security-first design from GitHub, and trying to bypass it completely is not advisable. Best approach instead:
Note: GitHub intentionally requires approval for all external contributor PRs (including Copilot) to prevent unauthorized code execution. This protects your repository's integrity! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Why are you starting this discussion?
Question
What GitHub Actions topic or product is this about?
Workflow Configuration
Discussion Details
Hi everyone,
I’m experiencing an issue with GitHub Actions in an Organization-owned repository, and I’d appreciate clarification on the expected behavior.
Setup
Intended behavior:
When a PR transitions to Ready for review (i.e.,
review_requested), the workflow should automatically run our test scripts as part of CI validation.Problem
Instead of running automatically, the workflow displays:
Manual approval is required before the workflow executes, which breaks our intended CI automation.
What I have confirmed
environmentprotection rules.However, workflows triggered by Copilot-authored PRs still require manual approval.
Questions
How can we disable manual "Approve workflows to run" for Copilot-authored PRs in an Organization repository while keeping Organization-level protections enabled?
Why is Copilot still considered a first-time contributor even after it has previously opened and merged PRs in this repository?
In the same PR, after I manually approve the workflow once and it runs successfully,
if I later comment and ask Copilot to make changes, Copilot updates the PR, the PR state transitions again to review_requested, and the workflow is triggered —
why does it require manual approval again?
Is approval scoped per workflow run rather than per PR?
Any clarification on how GitHub evaluates contributor trust and workflow approvals in this scenario would be greatly appreciated.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions