Keep the guard's push wording for main (issue 948)
This commit is contained in:
@@ -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");
|
||||||
|
|||||||
Reference in New Issue
Block a user