Keep non-default quick action on full PR flow
Co-authored-by: codex <[email protected]>
This commit is contained in:
1 parent
f11764c517
commit
dcd2d50768
2 files changed
+4
-4
No files matched your search
@@ -365,7 +365,7 @@ describe("when: working tree has local changes", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("resolveQuickAction returns commit and push when open PR exists", () => {
|
||||
it("resolveQuickAction keeps full commit/push/pr flow on non-default branches even when PR exists", () => {
|
||||
const quick = resolveQuickAction(
|
||||
status({
|
||||
hasWorkingTreeChanges: true,
|
||||
@@ -382,8 +382,8 @@ describe("when: working tree has local changes", () => {
|
||||
);
|
||||
assert.deepInclude(quick, {
|
||||
kind: "run_action",
|
||||
action: "commit_push",
|
||||
label: "Commit & push",
|
||||
action: "commit_push_pr",
|
||||
label: "Commit, push & create PR",
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -204,7 +204,7 @@ export function resolveQuickAction(
|
||||
}
|
||||
|
||||
if (hasChanges) {
|
||||
if (hasOpenPr || isDefaultBranch) {
|
||||
if (isDefaultBranch) {
|
||||
return { label: "Commit & push", disabled: false, kind: "run_action", action: "commit_push" };
|
||||
}
|
||||
return {
|
||||
|
||||
Reference in new issue
Block a user