-
Notifications
You must be signed in to change notification settings - Fork 3.5k
feat: poll for linked PR after assigning Copilot to issue #1810
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
SamMorrowDrums
merged 8 commits into
main
from
SamMorrowDrums/assign-copilot-poll-linked-pr
Jan 16, 2026
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
e1cfb91
feat: poll for linked PR after assigning Copilot to issue
SamMorrowDrums b23784f
fix: filter PRs by timestamp to avoid returning stale results
SamMorrowDrums cfdc6a1
fix: remove tool name reference from pending note message
SamMorrowDrums 6cfa8ce
fix: address review feedback
SamMorrowDrums 40849b1
refactor: use GraphQLFeaturesTransport internally
SamMorrowDrums 7184f60
Merge branch 'main' into SamMorrowDrums/assign-copilot-poll-linked-pr
SamMorrowDrums 3bd6645
feat: add progress notifications during PR polling in assign_copilot_…
SamMorrowDrums b12ff84
Merge branch 'main' into SamMorrowDrums/assign-copilot-poll-linked-pr
SamMorrowDrums File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| package github | ||
|
|
||
| import ( | ||
| "net/http" | ||
| "strings" | ||
| ) | ||
|
|
||
| // GraphQLFeaturesTransport is an http.RoundTripper that adds GraphQL-Features | ||
| // header to requests based on context values. This is required for using | ||
| // non-GA GraphQL API features like the agent assignment API. | ||
| // | ||
| // This transport is used internally by the MCP server and is also exported | ||
| // for library consumers who need to build their own HTTP clients with | ||
| // GraphQL feature flag support. | ||
| // | ||
| // Usage: | ||
| // | ||
| // httpClient := &http.Client{ | ||
| // Transport: &github.GraphQLFeaturesTransport{ | ||
| // Transport: http.DefaultTransport, | ||
| // }, | ||
| // } | ||
| // gqlClient := githubv4.NewClient(httpClient) | ||
| // | ||
| // Then use withGraphQLFeatures(ctx, "feature_name") when calling GraphQL operations. | ||
| type GraphQLFeaturesTransport struct { | ||
| // Transport is the underlying HTTP transport. If nil, http.DefaultTransport is used. | ||
| Transport http.RoundTripper | ||
| } | ||
SamMorrowDrums marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| // RoundTrip implements http.RoundTripper. | ||
| func (t *GraphQLFeaturesTransport) RoundTrip(req *http.Request) (*http.Response, error) { | ||
| transport := t.Transport | ||
| if transport == nil { | ||
| transport = http.DefaultTransport | ||
| } | ||
|
|
||
| // Clone the request to avoid mutating the original | ||
| req = req.Clone(req.Context()) | ||
|
|
||
| // Check for GraphQL-Features in context and add header if present | ||
| if features := GetGraphQLFeatures(req.Context()); len(features) > 0 { | ||
| req.Header.Set("GraphQL-Features", strings.Join(features, ", ")) | ||
| } | ||
|
|
||
| return transport.RoundTrip(req) | ||
| } | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.