Keep the guard's push wording for main (issue 948)

This commit is contained in:
fix-forge-awg
2026-10-16 21:28:49 +02:00
parent 7807135a1b
commit 789aa0133f
+1 -1
View File
@@ -323,7 +323,7 @@ export function judgeProtectionChange(before: BranchProtection | null, want: Pro
* that enables push, drops the merge whitelist or widens it past that account is refused, whatever the rule was. */ * that enables push, drops the merge whitelist or widens it past that account is refused, whatever the rule was. */
function judgeMain(before: BranchProtection | null, want: ProtectionWanted): string | null { function judgeMain(before: BranchProtection | null, want: ProtectionWanted): string | null {
const why: string[] = []; const why: string[] = [];
if (want.push === true) why.push("it lets a person push to main directly"); if (want.push === true) why.push("it lets a person push to the branch directly");
if (want.mergeWhitelist !== undefined) { if (want.mergeWhitelist !== undefined) {
const names = want.mergeWhitelist ?? []; const names = want.mergeWhitelist ?? [];
if (names.length === 0) why.push("it drops the merge whitelist of main"); if (names.length === 0) why.push("it drops the merge whitelist of main");