feat: update assign-to-agent to use REST API instead of GraphQL#5898
Merged
feat: update assign-to-agent to use REST API instead of GraphQL#5898
Conversation
Updates the assign-to-agent safe output to use the new REST API for assigning Copilot coding agent to issues, as announced in the GitHub December 2025 changelog. Key changes: - Add assignAgentToIssueRest() using github.rest.issues.addAssignees() - Add isAgentAssigned() to check assignment status via REST - Use REST API first with GraphQL fallback for compatibility - Reduce permissions from 4 write permissions to just issues: write - Add comprehensive tests for new REST API functions (37 tests pass) - Update documentation with REST API details and simplified requirements Reference: https://github.blog/changelog/2025-12-03-assign-issues-to-copilot-using-the-api/
Contributor
Author
|
@copilot Please find out why this dev.md run failed: https://github.com/githubnext/gh-aw/actions/runs/20039762441 |
Contributor
Contributor
Author
|
What! I didn't merge this! |
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Updates the
assign-to-agentsafe output to use the new REST API for assigning the Copilot coding agent to issues, as announced in the GitHub December 2025 changelog.Key Changes
JavaScript Implementation
assign_agent_helpers.cjs: Added newassignAgentToIssueRest()function usinggithub.rest.issues.addAssignees()REST endpointassign_agent_helpers.cjs: AddedisAgentAssigned()to check assignment status via REST APIassign_agent_helpers.cjs: UpdatedassignAgentToIssueByName()to try REST API first with GraphQL fallbackassign_to_agent.cjs: Simplified to use REST API directly, removed GraphQL-specific codeGo Changes
assign_to_agent.go: Reduced permissions fromNewPermissionsActionsWriteContentsWriteIssuesWritePRWrite()toNewPermissionsContentsReadIssuesWrite()Documentation
safe-outputs.mdwith REST API details and simplified token requirementsTests
assignAgentToIssueRest()functionisAgentAssigned()functionBenefits
issues: writeneededREST API Endpoint Used
Reference