Skip to content

Commit

Permalink
Use github_issue_labels
Browse files Browse the repository at this point in the history
  • Loading branch information
ezzatron committed Jan 10, 2024
1 parent eba83ad commit caae47e
Show file tree
Hide file tree
Showing 2 changed files with 99 additions and 50 deletions.
145 changes: 95 additions & 50 deletions modules/issue-labels/issue-labels.tf
Original file line number Diff line number Diff line change
@@ -1,61 +1,106 @@
locals {
issue_label_color_renovate = "0366D6"
issue_label_color_renovate_safe = "168700"
issue_label_color_renovate_unsafe = "D93F0B"
issue_label_color_renovate = "0366d6"
issue_label_color_renovate_safe = "168700"
issue_label_color_renovate_unsafe = "d93f0b"
issue_label_color_renovate_security = "d73a4a"
}

resource "github_issue_label" "renovate" {
repository = var.repository
name = "renovate"
description = "Pull requests created by Renovate"
color = local.issue_label_color_renovate
}
resource "github_issue_labels" "this" {
repository = var.repository

resource "github_issue_label" "github_actions" {
repository = var.repository
name = "github-actions"
description = "Pull requests that update GitHub Actions dependencies"
color = local.issue_label_color_renovate
}
label {
name = "renovate"
description = "Pull requests created by Renovate"
color = local.issue_label_color_renovate
}

resource "github_issue_label" "npm" {
repository = var.repository
name = "npm"
description = "Pull requests that update NPM dependencies"
color = local.issue_label_color_renovate
}
label {
name = "docker"
description = "Pull requests that update Docker dependencies"
color = local.issue_label_color_renovate
}

resource "github_issue_label" "terraform" {
repository = var.repository
name = "terraform"
description = "Pull requests that update Terraform dependencies"
color = local.issue_label_color_renovate
}
label {
name = "github-actions"
description = "Pull requests that update GitHub Actions dependencies"
color = local.issue_label_color_renovate
}

resource "github_issue_label" "major" {
repository = var.repository
name = "major"
description = "Pull requests that update major dependency versions"
color = local.issue_label_color_renovate_unsafe
}
label {
name = "gomod"
description = "Pull requests that update gomod dependencies"
color = local.issue_label_color_renovate
}

resource "github_issue_label" "non_major" {
repository = var.repository
name = "non-major"
description = "Pull requests that update non-major dependency versions"
color = local.issue_label_color_renovate_safe
}
label {
name = "gradle"
description = "Pull requests that update Gradle dependencies"
color = local.issue_label_color_renovate
}

resource "github_issue_label" "non_dev" {
repository = var.repository
name = "non-dev"
description = "Pull requests that update non-dev dependencies"
color = local.issue_label_color_renovate_unsafe
}
label {
name = "helm"
description = "Pull requests that update Helm dependencies"
color = local.issue_label_color_renovate
}

label {
name = "npm"
description = "Pull requests that update NPM dependencies"
color = local.issue_label_color_renovate
}

label {
name = "nuget"
description = "Pull requests that update NuGet dependencies"
color = local.issue_label_color_renovate
}

label {
name = "swift"
description = "Pull requests that update Swift dependencies"
color = local.issue_label_color_renovate
}

label {
name = "terraform"
description = "Pull requests that update Terraform dependencies"
color = local.issue_label_color_renovate
}

label {
name = "major"
description = "Pull requests that update major dependency versions"
color = local.issue_label_color_renovate_unsafe
}

label {
name = "non-major"
description = "Pull requests that update non-major dependency versions"
color = local.issue_label_color_renovate_safe
}

label {
name = "non-dev"
description = "Pull requests that update non-dev dependencies"
color = local.issue_label_color_renovate_unsafe
}

label {
name = "dev"
description = "Pull requests that update dev dependencies"
color = local.issue_label_color_renovate_safe
}

label {
name = "trusted"
description = "Pull requests that update trusted dependencies"
color = local.issue_label_color_renovate_safe
}

resource "github_issue_label" "dev" {
repository = var.repository
name = "dev"
description = "Pull requests that update dev dependencies"
color = local.issue_label_color_renovate_safe
label {
name = "security"
description = "Pull requests that address security vulnerabilities"
color = local.issue_label_color_renovate_security
}
}
4 changes: 4 additions & 0 deletions self-issue-labels.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module "repos_issue_labels" {
source = "./modules/issue-labels"
repository = "repos"
}

0 comments on commit caae47e

Please sign in to comment.