fix(server): skip PR lookup for unknown providers #5831
main fromrefs/pull/5831/headopened View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelssize:XS
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
- apps/server/src/git/GitManager.ts lines 1296 to 1297OutdatedResolvedby Lucenx9(GitHub profile, opens in a new tab)@@ -1292,3 +1292,6 @@12921292 cwd: string,12931293 headContext: BranchHeadContext,12941294 ) {1295+ const provider = yield* sourceControlProvider(cwd);1296+ if (provider.kind === "unknown") {1297+ return null;
- apps/server/src/git/GitManager.ts line 1382Resolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -1292,3 +1292,7 @@12921292 cwd: string,12931293 headContext: BranchHeadContext,12941294 ) {1295+ const provider = yield* sourceControlProvider(cwd);1296+ if (provider.kind === "unknown") {1297+ return null;1298+ }
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:XS
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
- apps/server/src/git/GitManager.ts lines 956 to 957OutdatedResolvedby Lucenx9(GitHub profile, opens in a new tab)@@ -935,13 +940,18 @@935940 // Only skip when the branch is untracked as well: anything carrying an936941 // upstream keeps the old behaviour.937942 if (details.upstreamRef === null && (yield* isUnpublishedBranch(cwd, headContext))) {938- return { latest: null, headContext };943+ return {944+ outcome: { _tag: "Complete", latest: null } satisfies PrLookupOutcome,945+ headContext,946+ };939947 }940- const latest = yield* findLatestPrForHeadContext(cwd, headContext);941- return { latest, headContext };948+ const outcome = yield* findLatestPrForHeadContext(cwd, headContext);949+ return { outcome, headContext };942950 });943951 },944952 {945953 capacity: PR_LOOKUP_CACHE_CAPACITY,946954 timeToLive: (exit, key) => {947955 if (Exit.isSuccess(exit)) {956+ if (exit.value.outcome._tag === "ProviderUnknown") {957+ return nextPrLookupFailureTtl(key);
Lucenx9(GitHub profile, opens in a new tab) closed this
Lucenx9(GitHub profile, opens in a new tab) reopened this
Lucenx9(GitHub profile, opens in a new tab) closed this
github-actions[bot](GitHub profile, opens in a new tab) removed labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
Lucenx9(GitHub profile, opens in a new tab) reopened this
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:M
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes
Lucenx9(GitHub profile, opens in a new tab) closed this
Lucenx9(GitHub profile, opens in a new tab) reopened this
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:L
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
Lucenx9(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.


Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID:
ba460634-9444-469a-b4bb-002ccd50ffa9You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
Comment `@coderabbitai help` to get the list of available commands.