Skip to content

Commit

Permalink
chore: enable Dependabot security updates (#347)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiehan authored Jan 6, 2025
1 parent 506334e commit cfd6f60
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions lib/repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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,
});
}
}
}

0 comments on commit cfd6f60

Please sign in to comment.