Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve existing repo topic tags when adding "nextstrain" and "pathogen" #10

Merged
merged 1 commit into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions README.md
victorlin marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,14 @@ Make those changes so:
> You'll need ambiently-configured AWS credentials with broad admin-level
> access to read (and optionally modify) resources in our account.
>
> You'll also need a `GITHUB_TOKEN` in the environment with the `actions:write`
> fine-grained token permission on our repos.
> You'll also need a `GITHUB_TOKEN` in the environment with the following
> fine-grained token permissions on our repos:
>
> Please step cautiously and be careful when using them!
> - `actions:write`
> - `administration:write`
>
> Please step cautiously and be careful when using these two sets of
> credentials!


## Documentation
Expand Down
9 changes: 7 additions & 2 deletions env/production/github-repos.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
resource "github_repository_topics" "nextstrain" {
data "github_repository" "pathogen" {
for_each = toset(flatten(values(local.pathogen_repos)))
name = each.key
}

resource "github_repository_topics" "pathogen" {
for_each = data.github_repository.pathogen
repository = each.key
topics = ["nextstrain", "pathogen"]
topics = toset(flatten([each.value.topics, "nextstrain", "pathogen"]))
}