File tree Expand file tree Collapse file tree 1 file changed +25
-11
lines changed Expand file tree Collapse file tree 1 file changed +25
-11
lines changed Original file line number Diff line number Diff line change @@ -2,19 +2,33 @@ import 'reflect-metadata'
2
2
import { Repository } from '../resources/repository'
3
3
import { format } from './shared/format'
4
4
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'
5
9
6
10
function isPublic ( repository : Repository ) {
7
11
return repository . visibility === 'public'
8
12
}
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
+
9
34
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 ( )
You can’t perform that action at this time.
0 commit comments