Skip to content

Commit 6d394e3

Browse files
authored
Update fix-yaml-config.ts
1 parent b8a4a01 commit 6d394e3

File tree

1 file changed

+25
-11
lines changed

1 file changed

+25
-11
lines changed

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

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,33 @@ import 'reflect-metadata'
22
import {Repository} from '../resources/repository'
33
import {format} from './shared/format'
44
import {setPropertyInAllRepos} from './shared/set-property-in-all-repos'
5+
import { toggleArchivedRepos } from './shared/toggle-archived-repos'
6+
import { getAccessSummaryDescription } from './shared/get-access-summary-description'
7+
8+
import * as core from '@actions/core'
59

610
function isPublic(repository: Repository) {
711
return repository.visibility === 'public'
812
}
13+
async function run() {
14+
await setPropertyInAllRepos(
15+
'secret_scanning',
16+
true,
17+
r => isPublic(r)
18+
)
19+
await setPropertyInAllRepos(
20+
'secret_scanning_push_protection',
21+
true,
22+
r => isPublic(r)
23+
)
24+
25+
await toggleArchivedRepos()
26+
27+
const accessSummaryDescription = await getAccessSummaryDescription()
28+
core.setOutput('comment', accessSummaryDescription)
29+
30+
await format()
31+
}
32+
run()
33+
934

10-
setPropertyInAllRepos(
11-
'secret_scanning',
12-
true,
13-
r => isPublic(r)
14-
)
15-
setPropertyInAllRepos(
16-
'secret_scanning_push_protection',
17-
true,
18-
r => isPublic(r)
19-
)
20-
format()

0 commit comments

Comments
 (0)