From 3a76e781ed2a0662f45c50bb0c0ced772159b9e4 Mon Sep 17 00:00:00 2001 From: Natasha <67543397+NovemberTang@users.noreply.github.com> Date: Tue, 27 Feb 2024 11:03:15 +0000 Subject: [PATCH] use more accurate name --- packages/common/src/pull-requests.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/common/src/pull-requests.ts b/packages/common/src/pull-requests.ts index 84f6548ca..f6c27359a 100644 --- a/packages/common/src/pull-requests.ts +++ b/packages/common/src/pull-requests.ts @@ -173,10 +173,10 @@ export async function createPrAndAddToProject( `${author}[bot]`, ); - const protection1 = await hasBranchProtection(octokit, repoName); - const protection2 = await productionCustomProperty(octokit, repoName); + const usesBranchProtectionRule = await hasBranchProtection(octokit, repoName); + const usesCentralRuleset = await productionCustomProperty(octokit, repoName); - const branchIsProtected = protection1 || protection2; + const branchIsProtected = usesBranchProtectionRule || usesCentralRuleset; console.log('Branch is protected by rule or ruleset:', branchIsProtected);