Skip to content

Add auto-approve workflow for GitHub Copilot agent PRs #232

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 22, 2025

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jul 22, 2025

This PR adds a dedicated GitHub Actions workflow to automatically approve pull requests created by the GitHub Copilot SWE agent.

Changes Made

  • Created .github/workflows/auto_approve_copilot.yaml with the following functionality:
    • Triggers on PR opened and synchronize events
    • Only runs when github.actor == 'copilot-swe-agent' for security
    • Uses hmarr/auto-approve-action@v3 for reliable auto-approval
    • Leverages GITHUB_TOKEN for authentication

Benefits

  • Streamlined workflow: Reduces manual intervention for agent-created PRs
  • Security focused: Only auto-approves PRs from the specific Copilot agent
  • Reliable automation: Uses well-maintained action for consistent behavior

Workflow Structure

name: Auto-approve Copilot PRs

on:
  pull_request:
    types: [opened, synchronize]

jobs:
  auto-approve:
    runs-on: ubuntu-latest
    if: github.actor == 'copilot-swe-agent'
    steps:
      - name: Auto-approve PR from Copilot agent
        uses: hmarr/auto-approve-action@v3
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}

The workflow follows the same structure and conventions as existing workflows in the repository and has been validated for proper YAML syntax.

Fixes #231.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Co-authored-by: pamelafox <297042+pamelafox@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] Add auto-approve workflow for GitHub Copilot agent PRs Add auto-approve workflow for GitHub Copilot agent PRs Jul 22, 2025
@Copilot Copilot AI requested a review from pamelafox July 22, 2025 16:54
Copilot finished work on behalf of pamelafox July 22, 2025 16:54
@pamelafox pamelafox marked this pull request as ready for review July 22, 2025 17:00
@pamelafox pamelafox merged commit bb16fcf into main Jul 22, 2025
3 checks passed
@pamelafox pamelafox deleted the copilot/fix-231 branch July 22, 2025 17:00
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.

Add auto-approve workflow for GitHub Copilot agent PRs
2 participants