Avoid "workflows awaiting approval" when copilot agent create PRs #167493
Replies: 5 comments 1 reply
-
Hello Aj , To allow Copilot PRs to run actions without manual approval, you can: Go to Settings → Actions → General Under “Fork pull request workflows”, set to: 🔓 “Require approval for all outside collaborators” → Off Or enable “Run workflows from fork pull requests without approval” (not always recommended for security) Alternatively, convert Copilot-generated PRs into PRs from a trusted internal branch (instead of a fork), where workflows run normally. |
Beta Was this translation helpful? Give feedback.
-
1. Check Repository SettingsFirst, verify your current workflow permissions:
2. Modify Fork PR Workflow SettingsFor your specific issue with fork PRs:
3. Create a Personal Access Token (PAT) for Copilot
4. Alternative Solution: Use GitHub Actions Approvals APIYou can automate approvals programmatically: - name: Auto-approve workflow runs
if: github.actor == 'github-copilot[bot]'
run: |
curl -X POST \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/approve 5. Check Organization-Level Settings (If Applicable)If this is an organization repository:
Important Notes
Would you like me to provide more specific guidance about any of these solutions? |
Beta Was this translation helpful? Give feedback.
-
Would love a non LLM answer, the above replies makes no sense |
Beta Was this translation helpful? Give feedback.
-
GitHub treats Copilot PRs as coming from an untrusted fork every time, so it always needs manual approval. There's no setting to bypass that. Even after merging one, it won’t remember it. Only fix is to stop using Copilot's forked PRs and push changes from a trusted branch instead. |
Beta Was this translation helpful? Give feedback.
-
GitHub Copilot’s workflow runs are treated as first-time contributors, so approval is needed each time. There’s no current setting to auto-approve its actions—only way is to relax fork workflow approval or keep approving manually. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Question
Copilot Feature Area
Copilot Agent Mode
Body
When creating an issue and assigning github copilot, it is not allowed to run the actions (tests etc).
So for each iteration I need to press "approve" which slows down the flow quite a bit.
My settings:
settings/actions/Approval for running fork pull request workflows from contributors
is set to:"Require approval for first-time contributors
Only users who have never had a commit or pull request merged into this repository will require approval to run workflows."
So, I made a first PR with copilot. Merged it.
Made a second. Still, it needs my approval.
Question: where is the setting to allow copilot to run actions without me babysitting it?
Beta Was this translation helpful? Give feedback.
All reactions