Skip to content

Ignore copilot agent branches in the CI #448

@llucax

Description

@llucax

What's needed?

When using Copilot Coding Agent to create a PR, copilot pushes into a blessed repo branch, which triggers the CI workflow, but it will also be tested by the PR workflow, which is wasteful. We need to avoid this.

Proposed solution

  1. Add copilot/** to the ignored branches in cookiecutter/{{cookiecutter.github_repo_name}}/.github/workflows/ci.yaml.

    name: Dispatch-CI
    
    on:
        # ...
        branches-ignore:
          - ...
          - 'copilot/**'
  2. Add a migration step to cookiecutter/migrate.py to add the new ignore rule 'copilot/**' to existing repositories, but only if the rule doesn't exist already.

Metadata

Metadata

Assignees

No one assigned

    Labels

    part:ciAffects the GitHub workflow and other parts for running CIpart:templateAffects the cookiecutter template filestype:enhancementNew feature or enhancement visitble to users

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions