Limit default-branch confirmation to direct push
- Stop showing default-branch confirmation for `commit_push_pr` - Keep confirmation only for direct `commit_push` actions - Update logic test to match the new behavior
This commit is contained in:
1 parent
c884947ea8
commit
30e05538b7
2 files changed
+3
-3
No files matched your search
@@ -737,10 +737,10 @@ describe("when: branch has no upstream configured", () => {
|
||||
});
|
||||
|
||||
describe("requiresDefaultBranchConfirmation", () => {
|
||||
it("requires confirmation only for push actions on default branch", () => {
|
||||
it("requires confirmation only for direct push on default branch", () => {
|
||||
assert.isFalse(requiresDefaultBranchConfirmation("commit", true));
|
||||
assert.isTrue(requiresDefaultBranchConfirmation("commit_push", true));
|
||||
assert.isTrue(requiresDefaultBranchConfirmation("commit_push_pr", true));
|
||||
assert.isFalse(requiresDefaultBranchConfirmation("commit_push_pr", true));
|
||||
assert.isFalse(requiresDefaultBranchConfirmation("commit_push", false));
|
||||
});
|
||||
});
|
||||
|
||||
@@ -282,7 +282,7 @@ export function requiresDefaultBranchConfirmation(
|
||||
isDefaultBranch: boolean,
|
||||
): boolean {
|
||||
if (!isDefaultBranch) return false;
|
||||
return action === "commit_push" || action === "commit_push_pr";
|
||||
return action === "commit_push";
|
||||
}
|
||||
|
||||
export function resolveDefaultBranchActionDialogCopy(input: {
|
||||
|
||||
Reference in new issue
Block a user