infra: add auto-approve-copilot-runs workflow#104
Conversation
Co-authored-by: kayodebristol <3579196+kayodebristol@users.noreply.github.com> Agent-Logs-Url: https://github.com/plures/FinancialAdvisor/sessions/e4f512db-b1a5-48b7-9b18-37b012477629
There was a problem hiding this comment.
Pull request overview
Adds the missing GitHub Actions workflow to complete this repo’s Copilot PR lifecycle automation by automatically approving Copilot-triggered workflow runs via the GitHub REST API.
Changes:
- Introduces a new
.github/workflows/auto-approve-copilot-runs.ymlworkflow triggered onworkflow_runto auto-approve runs when the triggering actor isCopilot.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| on: | ||
| workflow_run: | ||
| workflows: ['*'] |
There was a problem hiding this comment.
on.workflow_run.workflows: ['*'] won’t match any workflows in this repo (filters are by exact workflow name, and there is no workflow named *). As a result, this workflow likely never triggers and the auto-approve behavior won’t run. Update this to list the actual workflow names you intend to auto-approve (e.g., "CI/CD Pipeline", etc.), and ensure you don’t include this workflow’s own name to avoid self-trigger loops.
| workflows: ['*'] | |
| workflows: ['CI/CD Pipeline', 'Tests'] |
kayodebristol
left a comment
There was a problem hiding this comment.
Auto-approved: CI green + Copilot code review complete.
Completes the Copilot PR lifecycle automation by adding the one missing workflow.
ci.ymlandcopilot-pr-lifecycle.ymlalready existed; onlyauto-approve-copilot-runs.ymlwas absent.Changes
.github/workflows/auto-approve-copilot-runs.yml— new workflow that listens onworkflow_run: requestedand immediately approves any run whose actor isCopilotvia the GitHub REST API. Uses built-inGITHUB_TOKENwithactions: writeonly.The
'Copilot'actor login is consistent with the check already used incopilot-pr-lifecycle.yml.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.