Use GraphQL for fetching GitHub Pull Requests#85
Merged
Malcolmnixon merged 2 commits intomainfrom Feb 17, 2026
Merged
Conversation
- Add PullRequestNode and related GraphQL types - Implement GetPullRequestsAsync in GitHubGraphQLClient - Create comprehensive tests for GetPullRequestsAsync - Add PullRequestInfo internal type to replace Octokit.PullRequest - Update GitHubRepoConnector to use GraphQL for pull requests - Replace Octokit PullRequest.GetAllForRepository with GraphQL Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Use GraphQL for fetching GitHub pull requests
Use GraphQL for fetching GitHub Pull Requests
Feb 17, 2026
Malcolmnixon
approved these changes
Feb 17, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Pull Request
Description
Replaces Octokit REST API
PullRequest.GetAllForRepositorywith GraphQL to continue Octokit removal.Core Changes:
GitHubGraphQLTypes.cs): AddedPullRequestNode,PullRequestMergeCommit,PullRequestLabelwith pagination supportGitHubGraphQLClient.cs): ImplementedGetPullRequestsAsyncwith cursor-based pagination (100 items/page), null-safe filteringGitHubRepoConnector.cs): CreatedPullRequestInfowrapper to eliminate Octokit dependency, addedGetAllPullRequestsAsyncadapter methodGitHubGraphQLClientGetPullRequestsTests.cs): 8 test cases covering valid responses, empty results, null data, HTTP errors, invalid JSON, paginationGraphQL Query Structure:
Type of Change
Related Issues
Addresses feature request for GraphQL-based pull request fetching.
Pre-Submission Checklist
Before submitting this pull request, ensure you have completed the following:
Build and Test
dotnet build --configuration Releasedotnet test --configuration ReleaseCode Quality
dotnet format --verify-no-changesQuality Checks
Please run the following checks before submitting:
cspell "**/*.{md,cs}"markdownlint "**/*.md"yamllint '**/*.{yml,yaml}'Testing
Documentation
Additional Notes
Test Results:
Architecture: Follows existing patterns for GraphQL methods (GetCommitsAsync, GetReleasesAsync). Internal wrapper types isolate Octokit dependencies for future removal.
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:
https://api.github.com/graphql/usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/BuildMark/BuildMark/test/DemaConsulting.BuildMark.Tests/bin/Release/net9.0/DemaConsulting.BuildMark.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/BuildMark/BuildMark/test/DemaConsulting.BuildMark.Tests/bin/Release/net9.0/DemaConsulting.BuildMark.Tests.deps.json /home/REDACTED/work/BuildMark/BuildMark/test/DemaConsulting.BuildMark.Tests/bin/Release/net9.0/testhost.dll --port 39773 --endpoint 127.0.0.1:039773 --role client --parentprocessid 5206 --telemetryoptedin false(http block)https://api.github.com/repos/demaconsulting/BuildMark/issues/usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/BuildMark/BuildMark/test/DemaConsulting.BuildMark.Tests/bin/Release/net9.0/DemaConsulting.BuildMark.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/BuildMark/BuildMark/test/DemaConsulting.BuildMark.Tests/bin/Release/net9.0/DemaConsulting.BuildMark.Tests.deps.json /home/REDACTED/work/BuildMark/BuildMark/test/DemaConsulting.BuildMark.Tests/bin/Release/net9.0/testhost.dll --port 39773 --endpoint 127.0.0.1:039773 --role client --parentprocessid 5206 --telemetryoptedin false(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.