Add a note for copilot-setup-steps.yml and using with a merge queue

Open Beginner friendly
#43,246 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
84/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
github-actions

Research direction

Start with the linked Copilot setup steps article and locate the existing copilot-setup-steps.yml example. Review how its push and pull_request triggers behave with merge queue branches, then update the example or add an inline note using the proposed configuration. Done means the documentation warns about unnecessary merge-queue runs while preserving manual testing and change validation.

Written by the indexing model from the issue text.

Description

content github_actions never-stale Waiting on contributor
Code of Conduct
What article on docs.github.com is affected?

https://docs.github.com/en/copilot/how-tos/use-copilot-agents/coding-agent/customize-the-agent-environment#customizing-copilots-development-environment-with-copilot-setup-steps

What part(s) of the article would you like to see updated?

Somewhat related to #42379

In the github docs, it says that you can add the following to you copilot-setup-steps.yml file:

name: "Copilot Setup Steps"

## Background
# Automatically run the setup steps when they are changed to allow for easy validation, and
# allow manual testing through the repository's "Actions" tab
on:
  workflow_dispatch:
  push:
    paths:
      - .github/workflows/copilot-setup-steps.yml
  pull_request:
    paths:
      - .github/workflows/copilot-setup-steps.yml

While this works, I've found that if you use a merge queue then using the above configuration results in your workflow running every time a PR is added to the merge queue. We are use the larger, custom image GitHub hosted runners and this results in unnecessary runs & costs.

github/copilot-sdk was the first public GitHub repo I found that had the same issue(although this one is just using default ubuntu-latest runners). It helped me figure out that behavior wasn't unique to our setup

Proposed Content Update

I'd like to update the docs to either add an inline comment with commented out code or add a little inline note about if using a merge queue. This is what ended up working for us:

name: "Copilot Setup Steps"

# Automatically run when changed so setup issues surface immediately.
# Also allows manual testing via the "Actions" tab.
on:
  workflow_dispatch:
  push:
    branches-ignore:
      - 'gh-readonly-queue/**'
    paths:
      - .github/workflows/copilot-setup-steps.yml
  pull_request:
    branches:
      - main
    paths:
      - .github/workflows/copilot-setup-steps.yml
Additional information

No response

Dominant language
TypeScript
Stars
20.9k
Forks
68.8k
Avg merge
15h 4m
Merged PRs (30d)
103

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from github/docs

All issues in github/docs

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.