Skip to content

feat(gh-aw): Auto-install copilot-setup-steps.yml when missing #1619

Closed

Description

@bradygaster

Auto-install copilot-setup-steps.yml

Part of #1612 (Squad Agentic Workflows epic).
Depends on: #1613 (shared/squad.md bootstrap component)

Overview

Reduce friction for new Squad users: if the target repo doesn't already have .github/workflows/copilot-setup-steps.yml, automatically include it in the Squad PR. This ensures the Copilot coding agent can work with the squad immediately after merge.

Behavior

  1. Check if .github/workflows/copilot-setup-steps.yml exists in the target repo
  2. If missing: Include a working copilot-setup-steps.yml in the Squad PR
  3. If present: Do nothing — never overwrite an existing setup steps file
  4. Version pinning: Pin to the same gh-aw version the workflow was installed from

Generated File Content

name: Copilot Setup Steps
on: workflow_dispatch

jobs:
  setup:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version: "20"
      - name: Install dependencies
        run: npm ci || true

(Actual content may vary based on repo's detected language/toolchain)

Key Constraints

  • Never overwrite existing copilot-setup-steps.yml
  • Only added as part of a Squad PR (not standalone)
  • Version pinned to the gh-aw version at install time
  • Content should be sensible defaults (can be customized by user after merge)

Acceptance Criteria

  • Setup steps file is included in Squad PR when missing from target repo
  • Existing copilot-setup-steps.yml is never overwritten
  • Generated file is valid GitHub Actions workflow syntax
  • File is pinned to appropriate gh-aw version
  • Works correctly across all three modes (Cast, Connect, Adopt)
  • PR description mentions the auto-included setup steps

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or improvementgh-awGitHub Agentic Workflows integration

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions