Skip to content

Commit

Permalink
use more accurate name
Browse files Browse the repository at this point in the history
  • Loading branch information
NovemberTang committed Feb 27, 2024
1 parent 39cee02 commit 3a76e78
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/common/src/pull-requests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 3a76e78

Please sign in to comment.