From cfd6f60fc6c85c9299441b5ad4c82f56276a9af9 Mon Sep 17 00:00:00 2001 From: Nara Kasbergen Kwon <855115+xiehan@users.noreply.github.com> Date: Mon, 6 Jan 2025 16:09:02 +0100 Subject: [PATCH] chore: enable Dependabot security updates (#347) --- lib/repository.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lib/repository.ts b/lib/repository.ts index f5d10df..fb1b256 100644 --- a/lib/repository.ts +++ b/lib/repository.ts @@ -12,6 +12,7 @@ import { IssueLabel } from "@cdktf/provider-github/lib/issue-label"; import { BranchProtection } from "@cdktf/provider-github/lib/branch-protection"; import { TeamRepository } from "@cdktf/provider-github/lib/team-repository"; import { RepositoryWebhook } from "@cdktf/provider-github/lib/repository-webhook"; +import { RepositoryDependabotSecurityUpdates } from "@cdktf/provider-github/lib/repository-dependabot-security-updates"; export interface ITeam { id: string; @@ -165,6 +166,14 @@ export class GithubRepository extends Construct { ...config, repository: this.resource, }); + + if (!name.endsWith("-go")) { + new RepositoryDependabotSecurityUpdates(this, "dependabot-security", { + provider, + repository: this.resource.name, + enabled: true, + }); + } } addSecret(name: string) { @@ -194,5 +203,13 @@ export class GithubRepositoryFromExistingRepository extends Construct { ...config, repository: this.resource, }); + + if (!name.endsWith("-go")) { + new RepositoryDependabotSecurityUpdates(this, "dependabot-security", { + provider: config.provider, + repository: this.resource.name, + enabled: true, + }); + } } }