You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What part(s) of the article would you like to see updated?
I don't think it should be suggested to have both push and pull_request as workflow triggers in the sample copilot-setup-steps.yml.
Note
If you run on push the commit in the pull_request will already have a Check Run associated with it from the push workflow trigger, so pull_request workflow trigger seems redundant in the sample workflow below.
ex.
name: "Copilot Setup Steps"# Automatically run the setup steps when they are changed to allow for easy validation, and# allow manual testing through the repository's "Actions" tabon:
workflow_dispatch:
push:
paths:
- .github/workflows/copilot-setup-steps.ymlpull_request:
paths:
- .github/workflows/copilot-setup-steps.ymljobs:
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.copilot-setup-steps:
runs-on: ubuntu-latest# Set the permissions to the lowest permissions possible needed for your steps.# Copilot will be given its own token for its operations.permissions:
# If you want to clone the repository as part of your setup steps, for example to install dependencies, you'll need the `contents: read` permission. If you don't clone the repository in your setup steps, Copilot will do this for you automatically after the steps complete.contents: read# You can define any steps you want, and they will run before the agent starts.# If you do not check out your code, Copilot will do this for you.steps:
- name: Checkout codeuses: actions/checkout@v5
- name: Set up Node.jsuses: actions/setup-node@v4with:
node-version: "20"cache: "npm"
- name: Install JavaScript dependenciesrun: npm ci
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#preinstalling-tools-or-dependencies-in-copilots-environment
What part(s) of the article would you like to see updated?
I don't think it should be suggested to have both
pushandpull_requestas workflow triggers in the samplecopilot-setup-steps.yml.Note
If you run on
pushthe commit in thepull_requestwill already have a Check Run associated with it from thepushworkflow trigger, sopull_requestworkflow trigger seems redundant in the sample workflow below.ex.

Additional information
No response