-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from code0-tech/add-github-management
Add github organization management
- Loading branch information
Showing
7 changed files
with
108 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -130,3 +130,4 @@ terraform.rc | |
.terraform.lock.hcl | ||
localTerraform.sh | ||
setLocalVariables.sh | ||
*.pem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
terraform { | ||
required_providers { | ||
github = { | ||
source = "integrations/github" | ||
version = "6.0.0" | ||
} | ||
} | ||
} | ||
|
||
locals { | ||
labels = { | ||
bug = { | ||
description = "Something isn't working" | ||
color = "d73a4a" | ||
} | ||
dependencies = { | ||
description = "This updates dependency files" | ||
color = "009966" | ||
} | ||
documentation = { | ||
description = "Improvements or additions to documentation" | ||
color = "0075ca" | ||
} | ||
duplicate = { | ||
description = "This issue or pull request already exists" | ||
color = "cfd3d7" | ||
} | ||
enhancement = { | ||
description = "New feature or request" | ||
color = "a2eeef" | ||
} | ||
"good first issue" = { | ||
description = "Good for newcomers" | ||
color = "7057ff" | ||
} | ||
"help wanted" = { | ||
description = "Extra attention is needed" | ||
color = "008672" | ||
} | ||
invalid = { | ||
description = "This doesn't seem right" | ||
color = "e4e669" | ||
} | ||
question = { | ||
description = "Further information is requested" | ||
color = "d876e3" | ||
} | ||
wontfix = { | ||
description = "This will not be worked on" | ||
color = "ffffff" | ||
} | ||
} | ||
} | ||
|
||
resource "github_issue_label" "global_labels" { | ||
for_each = local.labels | ||
|
||
color = each.value["color"] | ||
name = each.key | ||
description = each.value["description"] | ||
repository = var.repository | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
variable "repository" { | ||
type = string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
terraform { | ||
required_providers { | ||
github = { | ||
source = "integrations/github" | ||
version = "6.0.0" | ||
} | ||
} | ||
} | ||
|
||
data "github_repositories" "repositories" { | ||
query = "org:code0-tech" | ||
} | ||
|
||
module "global_labels" { | ||
source = "../../modules/github/global_labels" | ||
|
||
for_each = toset(data.github_repositories.repositories.names) | ||
repository = each.value | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters