File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed
Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change 1- import { Config } from '../yaml/config'
2- import { RepositoryBranchProtectionRule } from '../resources/repository-branch-protection-rule'
3- import { Repository } from '../resources/repository'
1+ import { Config } from '../yaml/config.js '
2+ import { RepositoryBranchProtectionRule } from '../resources/repository-branch-protection-rule.js '
3+ import { Repository } from '../resources/repository.js '
44import * as core from '@actions/core'
55
6- export async function doNotEnforceAdmins (
6+ export async function runDoNotEnforceAdmins (
77 repositoryAndRuleFilter : (
88 repository : Repository ,
99 branchProtectionRule : RepositoryBranchProtectionRule
1010 ) => boolean = ( ) => true
1111) : Promise < void > {
1212 const config = Config . FromPath ( )
1313
14+ doNotEnforceAdmins ( config , repositoryAndRuleFilter )
15+
16+ config . save ( )
17+ }
18+
19+ export async function doNotEnforceAdmins (
20+ repositoryAndRuleFilter : (
21+ repository : Repository ,
22+ branchProtectionRule : RepositoryBranchProtectionRule
23+ ) => boolean = ( ) => true
24+ ) : Promise < void > {
1425 const repositories = config . getResources ( Repository ) . filter ( r => ! r . archived )
1526 const rules = config
1627 . getResources ( RepositoryBranchProtectionRule )
You can’t perform that action at this time.
0 commit comments