Prefer upstream branch in push result summary
- show push target as `origin/<branch>` when available - update summarizeGitResult test expectation accordingly
This commit is contained in:
1 parent
78fabcfde9
commit
47019ad79d
2 files changed
+2
-2
No files matched your search
@@ -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",
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in new issue
Block a user