Agents - more GitHub REST API cleanup#312978
Merged
Conversation
Contributor
blocks-ci screenshots changedReplace the contents of Updated blocks-ci-screenshots.md<!-- auto-generated by CI — do not edit manually -->
#### editor/codeEditor/CodeEditor/Dark

#### editor/codeEditor/CodeEditor/Light

#### editor/inlineChatZoneWidget/InlineChatZoneWidget/Dark

#### editor/inlineChatZoneWidget/InlineChatZoneWidget/Light

#### editor/inlineChatZoneWidget/InlineChatZoneWidgetTerminated/Dark

#### editor/inlineChatZoneWidget/InlineChatZoneWidgetTerminated/Light
 |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR continues the Agents window GitHub REST API cleanup by consolidating the GitHubApiClient REST request surface into a single method that supports both request bodies and ETag-based conditional requests.
Changes:
- Introduced
IGitHubApiRequestOptionsand updatedGitHubApiClient.request()to returnIGitHubApiResponse<T>(removing the need for a separaterequest2()). - Updated GitHub fetchers to use the unified
request()API with{ etag }and{ data: ... }options. - Updated unit tests’ mock API client to match the new request signature/response shape.
Show a summary per file
| File | Description |
|---|---|
| src/vs/sessions/contrib/github/test/browser/githubFetchers.test.ts | Updates the mock client to use the new request(options) signature and response shape. |
| src/vs/sessions/contrib/github/browser/githubApiClient.ts | Adds request options type and unifies REST request handling into a single method returning { data, statusCode, etag }. |
| src/vs/sessions/contrib/github/browser/fetchers/githubRepositoryFetcher.ts | Migrates repository fetch to the unified request() with ETag support via options. |
| src/vs/sessions/contrib/github/browser/fetchers/githubPRFetcher.ts | Migrates PR fetch/reviews/comments to unified request() and uses options.data for POST bodies. |
| src/vs/sessions/contrib/github/browser/fetchers/githubPRCIFetcher.ts | Migrates CI-related REST calls to unified request() and keeps return handling consistent. |
| src/vs/sessions/contrib/github/browser/fetchers/githubChangesFetcher.ts | Migrates compare API call to unified request(). |
Copilot's findings
- Files reviewed: 6/6 changed files
- Comments generated: 0
sandy081
approved these changes
Apr 28, 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.
No description provided.