Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 5, 2025

Adds REST API support for Copilot agent assignment per the December 2025 GitHub API update, alongside existing GraphQL support.

Changes

  • New api-method option in assign-to-agent config: graphql (default) or rest
  • REST API implementation using POST /repos/{owner}/{repo}/issues/{issue_number}/assignees with agent_assignment object
  • Environment variable GH_AW_AGENT_API_METHOD passed to job for runtime routing
  • Staged preview and step summary now display the API method used

Usage

safe-outputs:
  assign-to-agent:
    api-method: rest  # or "graphql" (default)
    # All existing options work with both methods:
    # target_repository, base_branch, custom_instructions, custom_agent

REST API Format

Per GitHub community discussion:

{
  "assignees": ["copilot-swe-agent[bot]"],
  "agent_assignment": {
    "target_repo": "owner/repo",
    "base_branch": "main",
    "custom_instructions": "...",
    "custom_agent": "..."
  }
}

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

Copy link
Contributor Author

Copilot AI commented Dec 5, 2025

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • github.blog
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)
  • https://api.github.com/user
    • Triggering command: /usr/bin/gh gh api user --jq .login 5 GO111MODULE ache/go/1.25.0/x64/bin/go GOINSECURE parser GOMODCACHE go env ITAbVvSQ4 GO111MODULE (http block)
    • Triggering command: /usr/bin/gh gh api user --jq .login -json GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env tformat GO111MODULE e71869f3 GOINSECURE GOMOD GOMODCACHE 1658961/b332/fil/home/REDACTED/work/gh-aw/gh-aw/gh-aw (http block)
    • Triggering command: /usr/bin/gh gh api user --jq .login -json GO111MODULE 7355dfb3cd4b54dabdae6c042e479e881d5/log.json GOINSECURE GOMOD GOMODCACHE ps -go.�� -go.git GO111MODULE e/git-remote-https GOINSECURE GOMOD GOMODCACHE e/git-remote-htt-address (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Add support for new GitHub Copilot assignment API options feat: Add REST API method support for assign_to_agent Dec 5, 2025
Copilot AI requested a review from mrjf December 5, 2025 17:38
@mrjf mrjf marked this pull request as ready for review December 5, 2025 20:21
@pelikhan pelikhan deleted the branch update-assign-to-agent-api December 8, 2025 22:58
@pelikhan pelikhan closed this Dec 8, 2025
@pelikhan pelikhan deleted the copilot/sub-pr-5561-again branch December 8, 2025 22:58
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.

3 participants