Skip to content
TypeScript

Prefer upstream branch in push result summary

Julius Marminge47019ad79d55
diff --git a/apps/web/src/components/GitActionsControl.logic.test.ts b/apps/web/src/components/GitActionsControl.logic.test.ts
index 42ab3ebca88..6eba57429d2 100644
--- a/apps/web/src/components/GitActionsControl.logic.test.ts
+++ b/apps/web/src/components/GitActionsControl.logic.test.ts
@@ -615,7 +615,7 @@ describe("summarizeGitResult", () => {
});
assert.deepEqual(result, {
- title: "Pushed abcdef0 to foo",
+ title: "Pushed abcdef0 to origin/foo",
description: "fix: tighten quick action tooltip hover handling",
});
});
diff --git a/apps/web/src/components/GitActionsControl.logic.ts b/apps/web/src/components/GitActionsControl.logic.ts
index 3debfc121b0..ea9fd0ea00b 100644
--- a/apps/web/src/components/GitActionsControl.logic.ts
+++ b/apps/web/src/components/GitActionsControl.logic.ts
@@ -50,7 +50,7 @@ export function summarizeGitResult(
if (result.push.status === "pushed") {
const shortSha = shortenSha(result.commit.commitSha);
- const branch = result.push.branch ?? result.push.upstreamBranch;
+ const branch = result.push.upstreamBranch ?? result.push.branch;
const pushedCommitPart = shortSha ? ` ${shortSha}` : "";
const branchPart = branch ? ` to ${branch}` : "";
return withDescription(