Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Support assigning copilot to issues#418

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

williammartin
Copy link
Collaborator

Description

Closes:#398

This adds a new toolassign_copilot_to_issue, which...assigns copilot to an issue.

➜  github-mcp-server git:(398-add-a-tool-to-assign-copilot-to-issues) GOMAXPROCS=1 GITHUB_MCP_SERVER_E2E_HOST=https://github.com GITHUB_MCP_SERVER_E2E_TOKEN=$(gh auth token) go test -v -count=1 --run TestAssignCopilotToIssue --tags e2e ./e2e=== RUN   TestAssignCopilotToIssue=== PAUSE TestAssignCopilotToIssue=== CONT  TestAssignCopilotToIssue    e2e_test.go:79: Building Docker image for e2e tests...    e2e_test.go:162: Starting Stdio MCP client...    e2e_test.go:959: Getting current user...    e2e_test.go:988: Creating repository williammartin/github-mcp-server-e2e-TestAssignCopilotToIssue-1747756871756...    e2e_test.go:1011: Creating issue in williammartin/github-mcp-server-e2e-TestAssignCopilotToIssue-1747756871756...    e2e_test.go:1025: Assigning copilot to issue in williammartin/github-mcp-server-e2e-TestAssignCopilotToIssue-1747756871756...    e2e_test.go:997: Deleting repository williammartin/github-mcp-server-e2e-TestAssignCopilotToIssue-1747756871756...--- PASS: TestAssignCopilotToIssue (5.23s)PASSok      github.com/github/github-mcp-server/e2e 5.472s

Since the coding agent is in public preview, it can require configuring manually. Thus, the e2e test will skip if it gets an error that copilot could not be found as a reviewer.

➜  github-mcp-server git:(398-add-a-tool-to-assign-copilot-to-issues) GOMAXPROCS=1 GITHUB_MCP_SERVER_E2E_HOST=https://github.com GITHUB_MCP_SERVER_E2E_TOKEN=$(gh auth token) go test -v -count=1 --run TestAssignCopilotToIssue --tags e2e ./e2e=== RUN   TestAssignCopilotToIssue=== PAUSE TestAssignCopilotToIssue=== CONT  TestAssignCopilotToIssue    e2e_test.go:79: Building Docker image for e2e tests...    e2e_test.go:162: Starting Stdio MCP client...    e2e_test.go:959: Getting current user...    e2e_test.go:988: Creating repository williammartin/github-mcp-server-e2e-TestAssignCopilotToIssue-1747756857173...    e2e_test.go:1011: Creating issue in williammartin/github-mcp-server-e2e-TestAssignCopilotToIssue-1747756857173...    e2e_test.go:1025: Assigning copilot to issue in williammartin/github-mcp-server-e2e-TestAssignCopilotToIssue-1747756857173...    e2e_test.go:1034: skipping because copilot wasn't available as an assignee on this issue, it's likely that the owner doesn't have copilot enabled in their setttings <---------    e2e_test.go:997: Deleting repository williammartin/github-mcp-server-e2e-TestAssignCopilotToIssue-1747756857173...--- SKIP: TestAssignCopilotToIssue (5.93s)PASSok      github.com/github/github-mcp-server/e2e 6.156s

eranco74 reacted with thumbs up emoji
@CopilotCopilotAI review requested due to automatic review settingsMay 20, 2025 16:05
@williammartinwilliammartin requested a review froma team as acode ownerMay 20, 2025 16:05
@williammartinwilliammartinforce-pushed the398-add-a-tool-to-assign-copilot-to-issues branch fromb9f493e tob4da208CompareMay 20, 2025 16:06
Copy link
Contributor

@CopilotCopilotAI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Pull Request Overview

Adds support for assigning the Copilot bot to GitHub issues via a new tool and covers it with an end-to-end test.

  • Registers a newassign_copilot_to_issue tool in the server’s toolset
  • Implements the GraphQL logic to find and assign the Copilot bot
  • Extends E2E tests withTestAssignCopilotToIssue and related assertion fixes

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

FileDescription
pkg/github/tools.goAddsAssignCopilotToIssue to the initialized toolset
pkg/github/issues.goImplements the GraphQL-based assignment logic
internal/githubv4mock/*.goAdds typed-nil equality support in mock equality helpers and tests
e2e/e2e_test.goIntroduces the end-to-end test for assigning Copilot to issues
Comments suppressed due to low confidence (2)

pkg/github/issues.go:11

  • The handler inAssignCopilotToIssue usescontext.Context andfmt but neither package is imported; addimport "context" andimport "fmt" to avoid compile errors.
import (

e2e/e2e_test.go:990

  • The assertion message refers to'get_me' but this call is forcreate_repository; update the message to reflect the correct tool name.
require.NoError(t, err, "expected to call 'get_me' tool successfully")

@williammartinwilliammartinforce-pushed the398-add-a-tool-to-assign-copilot-to-issues branch fromb4da208 to4ea2a1aCompareMay 20, 2025 16:10
SamMorrowDrums
SamMorrowDrums previously approved these changesMay 21, 2025
Copy link
Collaborator

@SamMorrowDrumsSamMorrowDrums left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I love@mntlty's suggestion of the docs link. Some agents might even follow it and tell the user what to do themselves. Or just do it themselves and become the event that caused the singularity.

Other than the two suggestions I think this is awesome.

@williammartin
Copy link
CollaboratorAuthor

williammartin commentedMay 21, 2025
edited
Loading

I did a little work to provide a bit of structured data, and it seemed to work quite nicely with the focus on outcomes.

image
SamMorrowDrums reacted with heart emoji

SamMorrowDrums
SamMorrowDrums previously approved these changesMay 21, 2025
Copy link
Collaborator

@SamMorrowDrumsSamMorrowDrums left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I like it a lot, one comment about the placement of the links, and whether that work as I hope or if it fails to help the user fix the issue because it doesn't suggest the link. LMK :-D

Co-authored-by: Martina Jireckova <martinajir@github.com>
@SamMorrowDrumsSamMorrowDrums merged commitb9a06d0 intomainMay 23, 2025
16 checks passed
@SamMorrowDrumsSamMorrowDrums deleted the 398-add-a-tool-to-assign-copilot-to-issues branchMay 23, 2025 05:04
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@mntltymntltymntlty left review comments

Copilot code reviewCopilotCopilot left review comments

@SamMorrowDrumsSamMorrowDrumsSamMorrowDrums approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Add a tool to assign copilot to issues
3 participants
@williammartin@mntlty@SamMorrowDrums

[8]ページ先頭

©2009-2025 Movatter.jp