Skip to content

fix(health-check): send Copilot actor ID as an array - #93

Merged
wulfland merged 1 commit into
mainfrom
fix/copilot-assign
Oct 19, 2026
Merged

wulfland merged 1 commit into
mainfrom
fix/copilot-assign

Conversation

@wulfland

Copy link
Copy Markdown
Owner

What

Fixes the "Ensure Copilot is assigned" step in health-check.yml, which failed to assign incident #92 even with COPILOT_ASSIGN_TOKEN set:

Could not resolve to a node with the global id of '["BOT_kgDOC9w8XQ"]'
  • -F actorIds="[\"$copilot_id\"]" made gh send the literal string ["BOT_…"], not a JSON array. It now uses gh's array syntax: -f "actorIds[]=$copilot_id".
  • Both GraphQL calls now send GraphQL-Features: issues_copilot_assignment_api_support,coding_agent_model_selection, which GitHub's docs require for Copilot assignment.
  • The step comment now lists the PAT permissions the docs actually require: Actions, Contents, Issues and Pull requests, all read/write.

Checks

  • actionlint and prettier --check pass.
  • A read-only GraphQL query with -f "ids[]=<issue node id>" and the header returns the issue, which confirms the array encoding and the header are accepted. The assign mutation itself has not run yet.

For the reviewer

Scheduled runs use the workflow from main, so this only takes effect after merge. After merging, run gh workflow run health-check.yml while #92 is open. The step retries assignment on the existing issue.

Not in this PR: the Incident policy section that INCIDENT_TASK.md points to was dropped from AGENTS.md in #91.

🤖 Generated with Claude Code

`-F actorIds="[\"…\"]"` made gh send the literal string `["BOT_…"]`, so
addAssigneesToAssignable failed with NOT_FOUND even with a valid token.
Use gh's `actorIds[]=` syntax and send the GraphQL-Features header that
GitHub requires for Copilot assignment. Correct the PAT permissions in
the step comment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@wulfland
wulfland merged commit 75065e5 into main Oct 19, 2026
4 checks passed
@wulfland
wulfland deleted the fix/copilot-assign branch October 19, 2026 13:20
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