Skip to content

Commit cb42c04

Browse files
feat: add security_and_analysis enablement to setup (#631)
## PR Checklist - [x] Addresses an existing open issue: fixes #442 - [x] That issue was marked as [`status: accepting prs`](https://github.com/JoshuaKGoldberg/template-typescript-node-package/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22) - [x] Steps in [CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/template-typescript-node-package/blob/main/.github/CONTRIBUTING.md) were taken ## Overview Per https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28#update-a-repository, enables all three options in the API.
1 parent 9037e99 commit cb42c04

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/setup/steps/hydrateRepositorySettings.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,17 @@ export async function hydrateRepositorySettings(
2121
has_wiki: false,
2222
owner,
2323
repo: repository,
24+
security_and_analysis: {
25+
advanced_security: {
26+
status: "enabled",
27+
},
28+
secret_scanning: {
29+
status: "enabled",
30+
},
31+
secret_scanning_push_protection: {
32+
status: "enabled",
33+
},
34+
},
2435
squash_merge_commit_message: "PR_BODY",
2536
squash_merge_commit_title: "PR_TITLE",
2637
});

0 commit comments

Comments
 (0)