Skip to content

Commit 6dc3082

Browse files
committed
Fix server/client terminology mismatch for unknown provider kind
sourceControlChangeRequestTerms now maps 'unknown' to 'change request' instead of falling through to 'PR'/'pull request', matching the client-side resolveChangeRequestPresentation behavior.
1 parent e9fd83e commit 6dc3082

1 file changed

Lines changed: 7 additions & 9 deletions

File tree

apps/server/src/git/GitManager.ts

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -152,16 +152,14 @@ interface ChangeRequestTerms {
152152
}
153153

154154
function sourceControlChangeRequestTerms(kind: SourceControlProviderKind): ChangeRequestTerms {
155-
if (kind === "gitlab") {
156-
return {
157-
shortLabel: "MR",
158-
singular: "merge request",
159-
};
155+
switch (kind) {
156+
case "gitlab":
157+
return { shortLabel: "MR", singular: "merge request" };
158+
case "unknown":
159+
return { shortLabel: "change request", singular: "change request" };
160+
default:
161+
return { shortLabel: "PR", singular: "pull request" };
160162
}
161-
return {
162-
shortLabel: "PR",
163-
singular: "pull request",
164-
};
165163
}
166164

167165
function parseRepositoryNameFromPullRequestUrl(url: string): string | null {

0 commit comments

Comments
 (0)