Skip to content

feat: add copilot-setup-steps.yml for Copilot cloud agent - #301

Merged
don-petry merged 11 commits into
mainfrom
feat/add-copilot-setup-steps
May 21, 2026
Merged

don-petry merged 11 commits into
mainfrom
feat/add-copilot-setup-steps

Conversation

@don-petry

Copy link
Copy Markdown
Collaborator

Summary

Adds .github/workflows/copilot-setup-steps.yml to pre-install Node.js dependencies before each Copilot cloud agent session.

Why this matters

Without this file, Copilot discovers and installs dependencies itself via trial and error — slow, non-deterministic, and impossible for repos with private packages. Pre-installing with npm ci ensures the agent always starts with exact, cached dependencies matching CI.

The verify step fails the job if AGENTS.md is missing — catching a misconfigured repo before the agent begins work.

Stack

Node.js 20 / npm — Google Apps Script, TypeScript, Jest, Playwright.

Steps:

  1. actions/checkout (SHA-pinned)
  2. actions/setup-node@v4 with Node 20 + npm cache
  3. npm ci
  4. Verify environment (tool versions + AGENTS.md check)

Standard

Pre-installs Node.js 20 dependencies via npm ci before each Copilot
cloud agent session. Ensures the agent has all GAS/TypeScript/Jest
deps pre-cached for faster and more reliable sessions.

Stack: Node.js 20 / npm (Google Apps Script, TypeScript, Jest)
Template source: petry-projects/.github/standards/workflows/copilot-setup-steps.yml
Standard: ci-standards.md §11 Copilot Cloud Agent Setup

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented May 21, 2026 •

Copy link
Copy Markdown

Warning

Rate limit exceeded

@don-petry has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 11 minutes and 34 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c6154b4b-1667-4e10-9d14-cf6450046828

📥 Commits

Reviewing files that changed from the base of the PR and between ceb4456 and d3b2dec.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (1)
  • .github/workflows/copilot-setup-steps.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/add-copilot-setup-steps

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

…teps.yml

- Fork guard: replace github.event.repository.fork (reflects base repo, always false
  for org repos) with github.event_name != 'pull_request' || head.repo.fork == false
  so external fork PRs are skipped while direct pushes and manual runs still run
- Verify step: guard find .github/instructions with [ -d ] check to prevent
  pipefail abort when the directory is absent

Addresses review comments on combsmith/.github#328 (Codex P1 and P2).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
github-actions Bot and others added 9 commits May 21, 2026 07:52
Avoid executing package lifecycle scripts during Copilot environment setup,
matching SonarCloud recommendation for workflow hardening.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update lockfile-resolved transitive dependencies from npm audit fix to address:
- fast-uri host confusion vulnerability
- brace-expansion DoS vulnerability

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Apply prettier formatting to copilot-setup-steps workflow so autofix job no longer
  needs to commit workflow-file changes (which are blocked for app token without
  workflows:write)
- Keep npm audit lockfile remediations for fast-uri and brace-expansion vulnerabilities

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sonarqubecloud

Copy link
Copy Markdown

@don-petry
don-petry marked this pull request as ready for review May 21, 2026 12:18
@don-petry
don-petry requested a review from a team as a code owner May 21, 2026 12:18
Copilot AI review requested due to automatic review settings May 21, 2026 12:18
@don-petry
don-petry merged commit f604905 into main May 21, 2026
26 of 27 checks passed
@don-petry
don-petry deleted the feat/add-copilot-setup-steps branch May 21, 2026 12:19
@don-petry
don-petry removed the request for review from Copilot May 21, 2026 12:43
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