Skip to content

infra: add auto-approve-copilot-runs workflow#104

Merged
kayodebristol merged 2 commits intomainfrom
copilot/add-copilot-pr-lifecycle-again
Mar 25, 2026
Merged

infra: add auto-approve-copilot-runs workflow#104
kayodebristol merged 2 commits intomainfrom
copilot/add-copilot-pr-lifecycle-again

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 25, 2026

Completes the Copilot PR lifecycle automation by adding the one missing workflow. ci.yml and copilot-pr-lifecycle.yml already existed; only auto-approve-copilot-runs.yml was absent.

Changes

  • .github/workflows/auto-approve-copilot-runs.yml — new workflow that listens on workflow_run: requested and immediately approves any run whose actor is Copilot via the GitHub REST API. Uses built-in GITHUB_TOKEN with actions: write only.
on:
  workflow_run:
    workflows: ['*']
    types: [requested]

permissions:
  actions: write

jobs:
  auto-approve:
    runs-on: ubuntu-latest
    if: github.event.workflow_run.actor.login == 'Copilot'
    steps:
      - name: Approve workflow run
        run: |
          gh api \
            --method POST \
            repos/${{ github.repository }}/actions/runs/${{ github.event.workflow_run.id }}/approve
        env:
          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

The 'Copilot' actor login is consistent with the check already used in copilot-pr-lifecycle.yml.

Out of scope here: adding this repo to the praxis-business tier-1 list and plures/qa test suites — those require changes in their respective repositories.

Original prompt

This section details on the original issue you should resolve

<issue_title>infra: add Copilot PR lifecycle + auto-approve + CI workflows</issue_title>
<issue_description>## Summary
Onboard FinancialAdvisor into the praxis-business managed repo ecosystem with full lifecycle automation.

Requirements

  • .github/workflows/copilot-pr-lifecycle.yml — auto-merge Copilot PRs after review
  • .github/workflows/auto-approve-copilot-runs.yml — approve action_required runs
  • .github/workflows/ci.yml — lint, type-check, test, build on every PR
  • Add to praxis-business cross-repo manager tier 1 list
  • Add to QA system (plures/qa) test suites

Acceptance

  • Copilot PRs auto-merge after approved review
  • CI runs on every PR
  • Repo appears on praxis-business dashboard
  • QA runs against this repo</issue_description>

Comments on the Issue (you are @copilot in this section)

@kayodebristol @copilot Please implement this issue.

💡 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.

@github-actions github-actions Bot marked this pull request as ready for review March 25, 2026 07:53
Copilot AI review requested due to automatic review settings March 25, 2026 07:53
Copilot AI review requested due to automatic review settings March 25, 2026 07:53
Co-authored-by: kayodebristol <3579196+kayodebristol@users.noreply.github.com>
Agent-Logs-Url: https://github.com/plures/FinancialAdvisor/sessions/e4f512db-b1a5-48b7-9b18-37b012477629
Copilot AI requested review from Copilot and removed request for Copilot March 25, 2026 07:55
Copilot AI changed the title [WIP] Add Copilot PR lifecycle and CI workflows infra: add auto-approve-copilot-runs workflow Mar 25, 2026
Copilot AI requested a review from kayodebristol March 25, 2026 07:57
@kayodebristol kayodebristol requested a review from Copilot March 25, 2026 08:21
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.yml workflow triggered on workflow_run to auto-approve runs when the triggering actor is Copilot.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


on:
workflow_run:
workflows: ['*']
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
workflows: ['*']
workflows: ['CI/CD Pipeline', 'Tests']

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor

@kayodebristol kayodebristol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-approved: CI green + Copilot code review complete.

@kayodebristol kayodebristol merged commit 116cf05 into main Mar 25, 2026
11 checks passed
@kayodebristol kayodebristol deleted the copilot/add-copilot-pr-lifecycle-again branch March 25, 2026 08:49
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.

infra: add Copilot PR lifecycle + auto-approve + CI workflows

3 participants