Skip to content

Commit 1d78455

Browse files
authored
Update fix-yaml-config.ts
1 parent 1d65ba1 commit 1d78455

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

scripts/src/actions/fix-yaml-config.ts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import 'reflect-metadata'
2-
import {Repository} from '../resources/repository'
3-
import {RepositoryBranchProtectionRule} from '../resources/repository-branch-protection-rule'
4-
import {globToRegex} from '../utils'
5-
import {doNotEnforceAdmins} from './do-not-enforce-admins'
6-
import {addFileToAllRepos} from './shared/add-file-to-all-repos'
7-
import {format} from './shared/format'
8-
import {setPropertyInAllRepos} from './shared/set-property-in-all-repos'
9-
import {toggleArchivedRepos} from './shared/toggle-archived-repos'
10-
import {describeAccessChanges} from './shared/describe-access-changes'
2+
import {Repository} from '../resources/repository.js'
3+
import {RepositoryBranchProtectionRule} from '../resources/repository-branch-protection-rule.js'
4+
import {globToRegex} from '../utils.js'
5+
import {runDoNotEnforceAdmins} from './do-not-enforce-admins.js'
6+
import {runAddFileToAllRepos} from './shared/add-file-to-all-repos.js'
7+
import {runFormat} from './shared/format.js'
8+
import {runSetPropertyInAllRepos} from './shared/set-property-in-all-repos.js'
9+
import {runToggleArchivedRepos} from './shared/toggle-archived-repos.js'
10+
import {runDescribeAccessChanges} from './shared/describe-access-changes.js'
1111

1212
import * as core from '@actions/core'
1313

@@ -35,30 +35,30 @@ function isFork(repository: Repository) {
3535
}
3636

3737
async function run() {
38-
await addFileToAllRepos(
38+
await runAddFileToAllRepos(
3939
'.github/pull_request_template.md',
4040
'.github/helia_pull_request_template.md',
4141
r => isInitialised(r) && isHelia(r)
4242
)
4343

44-
await setPropertyInAllRepos(
44+
await runSetPropertyInAllRepos(
4545
'secret_scanning',
4646
true,
4747
r => isInitialised(r) && isPublic(r)
4848
)
49-
await setPropertyInAllRepos(
49+
await runSetPropertyInAllRepos(
5050
'secret_scanning_push_protection',
5151
true,
5252
r => isInitialised(r) && isPublic(r)
5353
)
54-
await doNotEnforceAdmins(
54+
await runDoNotEnforceAdmins(
5555
(repository: Repository, rule: RepositoryBranchProtectionRule) =>
5656
isInitialised(repository) &&
5757
repository.default_branch !== undefined &&
5858
globToRegex(rule.pattern).test(repository.default_branch)
5959
)
60-
await toggleArchivedRepos()
61-
const accessChangesDescription = await describeAccessChanges()
60+
await runToggleArchivedRepos()
61+
const accessChangesDescription = await runDescribeAccessChanges()
6262
core.setOutput(
6363
'comment',
6464
`The following access changes will be introduced as a result of applying the plan:
@@ -71,7 +71,7 @@ ${accessChangesDescription}
7171
7272
</details>`
7373
)
74-
await format()
74+
await runFormat()
7575
}
7676

7777
run()

0 commit comments

Comments
 (0)