Skip to content

Agents - more GitHub REST API cleanup#312978

Merged
lszomoru merged 3 commits intomainfrom
lszomoru/crucial-shrew
Apr 28, 2026
Merged

Agents - more GitHub REST API cleanup#312978
lszomoru merged 3 commits intomainfrom
lszomoru/crucial-shrew

Conversation

@lszomoru
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings April 28, 2026 08:00
@lszomoru lszomoru enabled auto-merge (squash) April 28, 2026 08:00
@lszomoru lszomoru self-assigned this Apr 28, 2026
@lszomoru lszomoru added this to the 1.119.0 milestone Apr 28, 2026
@github-actions
Copy link
Copy Markdown
Contributor

blocks-ci screenshots changed

Replace the contents of test/componentFixtures/blocks-ci-screenshots.md with:

Updated blocks-ci-screenshots.md
<!-- auto-generated by CI — do not edit manually -->

#### editor/codeEditor/CodeEditor/Dark
![screenshot](https://hediet-screenshots.azurewebsites.net/images/cb32a3e854b5734fe5aaca2318f2e0a42ee821b05ea97883ea42c5ba95edb3c3)

#### editor/codeEditor/CodeEditor/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/42624fbba5e0db7f32c224b5eb9c5dd3b08245697ae2e7d2a88be0d7c287129b)

#### editor/inlineChatZoneWidget/InlineChatZoneWidget/Dark
![screenshot](https://hediet-screenshots.azurewebsites.net/images/4baed4b05eeb8aadc8bc2dc633abfc87054cdeea4c35b7a655766063bcfedfed)

#### editor/inlineChatZoneWidget/InlineChatZoneWidget/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/b9d098d8ccc2bdb6b816537f14b1f1f3c10dadf294fc0b28d03d6e5a34eaf4c8)

#### editor/inlineChatZoneWidget/InlineChatZoneWidgetTerminated/Dark
![screenshot](https://hediet-screenshots.azurewebsites.net/images/4baed4b05eeb8aadc8bc2dc633abfc87054cdeea4c35b7a655766063bcfedfed)

#### editor/inlineChatZoneWidget/InlineChatZoneWidgetTerminated/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/b9d098d8ccc2bdb6b816537f14b1f1f3c10dadf294fc0b28d03d6e5a34eaf4c8)

Copy link
Copy Markdown
Contributor

Copilot AI 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

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 IGitHubApiRequestOptions and updated GitHubApiClient.request() to return IGitHubApiResponse<T> (removing the need for a separate request2()).
  • 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

@lszomoru lszomoru merged commit 0360932 into main Apr 28, 2026
43 of 45 checks passed
@lszomoru lszomoru deleted the lszomoru/crucial-shrew branch April 28, 2026 09:08
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