Skip to content

fix(copilot): keep repository hooks project-scoped - #442

Merged
christso merged 2 commits into
mainfrom
fix/github-hooks
Jul 29, 2026
Merged

fix(copilot): keep repository hooks project-scoped#442
christso merged 2 commits into
mainfrom
fix/github-hooks

Conversation

@christso

@christso christso commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

User-scoped sync no longer turns repository Copilot hooks into global hooks. Before this change, allagents update copied a plugin's .github/hooks/ into ~/.copilot/hooks/; commands such as bun .github/hooks/scripts/post-edit-lint.mjs then ran from whichever repository Copilot was editing and failed because the script was not there.

Repository .github/hooks/ artifacts now stay project-scoped, while portable root hooks/ artifacts continue to support both project and user scope. Potential legacy copies are reported but left untouched because older sync state did not record enough ownership information to delete them safely.

The existing promoted-GitHub-source E2E now uses the explicit AllAgents test-home override, keeping its prepared plugin cache isolated from runner state and network timing.

Related: WiseTechGlobal/mcp-ediprod#448

Validation

  • bun test - 1,338 passed, 5 skipped
  • bun run test:e2e - 116 passed, 4 skipped
  • bun run typecheck
  • bun run lint
  • bun run build
  • bun run docs:build

Manual E2E steps:

  1. Built the CLI and configured a temporary user workspace with the local mcp-ediprod checkout, clients: [copilot], and syncMode: copy.
  2. Ran ALLAGENTS_TEST_HOME=<temp-home> ./dist/index.js update and verified .github/hooks/post-edit-lint.json and its script were not created under <temp-home>/.copilot/hooks/, while other GitHub content still synced.
  3. Seeded the same paths to simulate an older install, reran update, and verified both files remained in place with actionable ownership warnings.
  4. Configured a temporary project workspace with the same plugin, ran the built CLI, verified .github/hooks/post-edit-lint.json and .github/hooks/scripts/post-edit-lint.mjs were copied, and ran the script successfully from the project root.
  5. Ran GitHub Copilot CLI 1.0.70 non-interactively against an empty temporary project using a clean fixed user configuration; it created the requested file and its debug logs contained no post-tool hook or module-resolution failure.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 29, 2026

Copy link
Copy Markdown

Deploying allagents with  Cloudflare Pages  Cloudflare Pages

Latest commit: e22a2f9
Status: ✅  Deploy successful!
Preview URL: https://61d3ed27.allagents.pages.dev
Branch Preview URL: https://fix-github-hooks.allagents.pages.dev

View logs

@christso
christso merged commit 7e4fade into main Jul 29, 2026
5 checks passed
@christso
christso deleted the fix/github-hooks branch July 29, 2026 22:59
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.

1 participant