Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 25, 2025

Copilot is a bot and requires GitHub API calls for issue assignment. The previous implementation used gh issue edit --add-assignee @copilot which doesn't work for bots.

Changes

  • pkg/workflow/create_issue.go: Updated buildCreateOutputIssueJob to detect copilot assignees and use gh api --method POST /repos/.../issues/$ISSUE_NUMBER/assignees with copilot[bot] instead of the gh CLI command
  • Tests: Updated unit and integration tests to verify GitHub API usage for copilot assignees while preserving existing behavior for regular users

Pattern

Now matches the PR reviewer implementation where copilot is handled via GitHub API:

safe-outputs:
  create-issue:
    assignees: [user1, copilot, user2]  # Mixed assignees supported

Generates:

  • gh api POST /repos/.../issues/$ISSUE_NUMBER/assignees -f 'assignees[]=copilot[bot]' for copilot
  • JavaScript assignee script via actions/github-script for regular users

Both use the same token precedence: GH_AW_COPILOT_TOKEN || GH_AW_GITHUB_TOKEN

Original prompt

Review the handling of "copilot" as a reviewer in create_issue. Since copilot is a bit, it needs to be treated differently to assign the issue to copilot agent.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Review handling of copilot in create_issue function Fix copilot bot assignment in create-issue to use GitHub API Oct 25, 2025
Copilot AI requested a review from pelikhan October 25, 2025 18:17
@pelikhan pelikhan closed this Oct 25, 2025
@pelikhan pelikhan deleted the copilot/update-copilot-issue-handling branch October 26, 2025 20:40
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