Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 22, 2025

The init --mcp command's injection logic only added the installation step when updating existing copilot-setup-steps.yml files, omitting the verification step that was present in the new file template.

Changes

  • pkg/cli/copilot_setup.go: Modified injectExtensionInstallStep to inject both installation and verification steps
  • pkg/cli/copilot_setup_test.go: Updated test expectations to validate both steps are injected

Example

When injecting into an existing workflow, both steps are now added:

steps:
  - name: Install gh-aw extension
    run: |
      curl -fsSL https://raw.githubusercontent.com/githubnext/gh-aw/refs/heads/main/install-gh-aw.sh | bash
  - name: Verify gh-aw installation
    run: ./gh-aw version
  - name: Checkout  # existing step
    uses: actions/checkout@v4

This matches the behavior of the template used when creating new files.

Original prompt

Update the copilot steps template generated by the "init" command to use installation script.

steps:


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

- Update injectExtensionInstallStep to inject both install and verify steps
- Update tests to expect and validate both steps
- Ensure consistency between template and injection behavior

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Update copilot steps template to use installation script Add verification step to copilot-setup-steps.yml injection Nov 22, 2025
Copilot AI requested a review from pelikhan November 22, 2025 02:56
Copilot finished work on behalf of pelikhan November 22, 2025 02:56
@pelikhan pelikhan marked this pull request as ready for review November 22, 2025 03:31
Copilot AI review requested due to automatic review settings November 22, 2025 03:31
@pelikhan pelikhan merged commit 46ee2cc into main Nov 22, 2025
122 of 123 checks passed
@pelikhan pelikhan deleted the copilot/update-copilot-steps-template branch November 22, 2025 03:32
Copilot finished reviewing on behalf of pelikhan November 22, 2025 03:33
Copy link
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

This PR enhances the init --mcp command's injection logic to include both installation and verification steps when updating existing copilot-setup-steps.yml files, matching the behavior of the template used for new files.

Key Changes:

  • Modified the injection function to add both install and verify steps instead of just the install step
  • Updated test expectations to validate that both steps are correctly injected
  • Updated function documentation to reflect the dual-step injection

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
pkg/cli/copilot_setup.go Updated injectExtensionInstallStep to inject both the installation step and the verification step into existing workflows
pkg/cli/copilot_setup_test.go Updated test expectations to validate that 2 steps (install + verify) are injected instead of just 1 step

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

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.

2 participants