Skip to content

Commit

Permalink
feat: archive GitHub repos of deprecated providers
Browse files Browse the repository at this point in the history
  • Loading branch information
xiehan authored and mergify[bot] committed Dec 13, 2023
1 parent 3b2ac20 commit 0ea0a04
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions lib/repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class RepositorySetup extends Construct {
"team" | "webhookUrl" | "provider" | "protectMain" | "protectMainChecks"
> & {
repository: Repository | DataGithubRepository;
}
},
) {
super(scope, name);

Expand All @@ -56,7 +56,7 @@ export class RepositorySetup extends Construct {
name: "automerge",
repository: repository.name,
provider,
})
}),
);

setOldId(
Expand All @@ -65,7 +65,7 @@ export class RepositorySetup extends Construct {
name: "no-auto-close",
repository: repository.name,
provider,
})
}),
);

new IssueLabel(this, `auto-approve-label`, {
Expand Down Expand Up @@ -98,7 +98,7 @@ export class RepositorySetup extends Construct {
},
],
provider,
})
}),
);
}

Expand All @@ -108,7 +108,7 @@ export class RepositorySetup extends Construct {
teamId: team.id,
permission: "admin",
provider,
})
}),
);

// Slack integration so we can be notified about new PRs and Issues
Expand All @@ -124,7 +124,7 @@ export class RepositorySetup extends Construct {
// We don't need to notify about PRs since they are auto-created
events: ["issues"],
provider,
})
}),
);
}
}
Expand Down Expand Up @@ -154,6 +154,7 @@ export class GithubRepository extends Construct {
this.resource = new Repository(this, "repo", {
name,
description,
archiveOnDestroy: true,
visibility: "public",
homepageUrl: "https://cdk.tf",
hasIssues: !name.endsWith("-go"),
Expand Down Expand Up @@ -190,7 +191,7 @@ export class GithubRepositoryFromExistingRepository extends Construct {
name: string,
config: RepositoryConfig & {
repositoryName: string;
}
},
) {
super(scope, name);

Expand Down

0 comments on commit 0ea0a04

Please sign in to comment.