Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): restore merge actions on hosts without the stacks API #12645

Closedbquenin(GitHub profile, opens in a new tab)wants to merge 3 commits intomain fromrefs/pull/12645/headopened View on GitHub

Showing 3 changed files with 129 additions and 20 deletions.

x
0 of 3 viewed, 3 left
111 additions and 15 deletionsapps/server/src/pullRequest/GitHubPullRequestCli.test.tsModified
View file
@@ -9,6 +9,7 @@
import { ChildProcessSpawner } from "effect/unstable/process";
​
import * as GitHubCli from "../sourceControl/GitHubCli.ts";
+import * as ProcessRunner from "../processRunner.ts";
import * as VcsProcess from "../vcs/VcsProcess.ts";
import * as SourceControlRateLimit from "../sourceControl/SourceControlRateLimit.ts";
import * as GitHubGraphQlBudget from "../sourceControl/githubGraphQlBudget.ts";
@@ -650,28 +651,123 @@
}),
​
- it.effect("reads a host that refuses the stacks preview as not stacked", () =>
+ it.effect.each([
+ ["gh: Not Found (HTTP 404)", "", null],
+ ["HTTP 404: Not Found (https://github.example/api/v3/repos/acme/web/stacks)", "", null],
+ ["gh: Resource not accessible by integration (HTTP 403)", undefined, "GitHubCliCommandError"],
+ ["gh: Service Unavailable (HTTP 503)", undefined, "GitHubCliCommandError"],
+ ["dial tcp: lookup github.example: no such host", undefined, "GitHubCliCommandError"],
+ [
+ "To get started with GitHub CLI, please run: gh auth login",
+ undefined,
+ "GitHubCliAuthenticationError",
+ ],
+ ["gh: Too Many Requests (HTTP 429)", undefined, "GitHubCliRateLimitError"],
+ ["gh: Not Found (HTTP 404)", "gh: Not Found (HTTP 404)", "GitHubPullRequestNotFoundError"],
+ ["gh: Not Found (HTTP 404)", "gh: Bad credentials (HTTP 401)", "GitHubCliCommandError"],
+ [
+ "gh: Not Found (HTTP 404)",