Skip to content

Add support for assigning issues to Copilot via REST API #544

@MariusStorhaug

Description

Context

GitHub supports assigning issues to Copilot using the REST API, enabling automated workflows to assign issues for Copilot-driven resolution. This capability was announced on December 3, 2025.

The module already has issue management functions that interact with the assignees parameter on issues, but there is no documentation, examples, or dedicated helper for the Copilot assignment workflow.

Request

The module should support assigning issues to Copilot through the existing issue management functions. The relevant REST API endpoints that accept Copilot as an assignee are:

Endpoint Description Documentation
POST /repos/{owner}/{repo}/issues/{issue_number}/assignees Add assignees to an issue Accepts assignees array
POST /repos/{owner}/{repo}/issues Create an issue Accepts assignees array
PATCH /repos/{owner}/{repo}/issues/{issue_number} Update an issue Accepts assignees array

All three endpoints accept an assignees parameter (array of strings) where Copilot can be included. Constraints:

  • Only users with push access can set assignees
  • Up to 10 assignees per issue
  • Assignees are silently dropped if the user lacks push access

What is expected

  • Existing issue management functions can assign Copilot to issues by passing the appropriate assignee identifier
  • Documentation and examples demonstrate how to assign issues to Copilot
  • Optionally, a helper parameter or convenience function simplifies the Copilot assignment workflow

Acceptance criteria

  • Copilot can be assigned to issues via the existing assignees parameter on issue functions
  • Examples show the Copilot assignment workflow (create issue, add assignee, update issue)
  • Documentation references the Copilot coding agent documentation

Note

GraphQL support also exists (requiring header GraphQL-Features: issues_copilot_assignment_api_support), but this issue focuses only on REST API support.


Technical decisions

Approach: This primarily requires documentation and examples rather than new functions. The existing issue functions already pass the assignees parameter to the API. The main work is verifying that Copilot's assignee identifier works correctly and documenting the pattern.

Copilot assignee identifier: Determine the exact string used to assign Copilot (likely copilot or a specific bot account name). This needs to be verified against the API documentation.

Optional helper: Consider whether a -AssignCopilot switch parameter on issue functions would add value, or whether documenting the assignee string is sufficient. Given the principle of not over-engineering, documentation with examples is the recommended approach.

Test approach: Integration test that assigns Copilot to a test issue and verifies the assignment via Get-GitHubIssue (or equivalent).


Implementation plan

Documentation

  • Verify the exact Copilot assignee identifier string against the API
  • Add examples showing Copilot assignment in issue function help blocks
  • Add documentation referencing the Copilot coding agent workflow

Tests

  • Add test verifying Copilot can be assigned to an issue via the assignees parameter

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions