Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(bitbucket): stop the startup sweep from flooding Bitbucket with 429s #23889

Mergedshivamhwp(GitHub profile, opens in a new tab)merged 6 commits intomain fromrefs/pull/23889/headmerged by shivamhwp(GitHub profile, opens in a new tab) View on GitHub

Showing 7 changed files with 117 additions and 17 deletions (loading 4).

x
0 of 7 viewed, 7 left
7 additions and 2 deletionsapps/server/src/git/GitManager.tsModified
View file
@@ -95,6 +95,7 @@
import type { GitManagerServiceError } from "@t3tools/contracts";
import * as GitVcsDriver from "../vcs/GitVcsDriver.ts";
import * as SourceControlProvider from "@t3tools/source-control-core/server/SourceControlProvider";
+import * as SourceControlRateLimit from "@t3tools/source-control-core/server/SourceControlRateLimit";
import * as SourceControlProviderRegistry from "../sourceControl/SourceControlProviderRegistry.ts";
import type { ChangeRequest } from "@t3tools/contracts";
​
@@ -2715,6 +2716,9 @@
+ // A user is waiting on these, so a host's background rate-limit pause must not refuse them.
+ const asUserAction = Effect.provideService(SourceControlRateLimit.Interactive, true);
+​
const resolvePullRequest: GitManager["Service"]["resolvePullRequest"] = Effect.fn(
"resolvePullRequest",
)(function* (input) {
@@ -2726,7 +2730,7 @@
.pipe(Effect.map((resolved) => toResolvedPullRequest(resolved)));
return { pullRequest };
- });
+ }, asUserAction);
const ensureNoTrackedChanges = Effect.fn("ensureNoTrackedChanges")(function* (
cwd: string,