From 5fc33a6526a80d75a94b2f2b2c8a32c5fd4c4ec2 Mon Sep 17 00:00:00 2001 From: Jake Hutchinson Date: Mon, 31 Mar 2025 10:11:55 +0100 Subject: [PATCH 1/2] Add automation label --- terraform/github/repositories.tf | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/terraform/github/repositories.tf b/terraform/github/repositories.tf index 662b8999..15269a31 100644 --- a/terraform/github/repositories.tf +++ b/terraform/github/repositories.tf @@ -41,6 +41,14 @@ resource "github_issue_label" "stackhpc_ci_label" { description = "Automated action performed by stackhpc-ci" } +resource "github_issue_label" "automated_label" { + for_each = toset(flatten(values(var.repositories))) + repository = each.value + name = "automated" + color = "C4F2A5" + description = "Automated action performed by GitHub Actions" +} + resource "github_issue_label" "workflows_label" { for_each = toset(flatten(values(var.repositories))) repository = each.value From 11ac9f4e5598f5641da76fe8dcfbdeab73924def Mon Sep 17 00:00:00 2001 From: Jake Hutchinson Date: Mon, 31 Mar 2025 10:26:22 +0100 Subject: [PATCH 2/2] Remove stackhpc-ci label --- .../roles/source-repo-sync/tasks/add_community_files.yml | 4 ++-- terraform/github/repositories.tf | 8 -------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/ansible/roles/source-repo-sync/tasks/add_community_files.yml b/ansible/roles/source-repo-sync/tasks/add_community_files.yml index 00993721..798ec80f 100644 --- a/ansible/roles/source-repo-sync/tasks/add_community_files.yml +++ b/ansible/roles/source-repo-sync/tasks/add_community_files.yml @@ -72,7 +72,7 @@ - name: Ensure required labels exists on remote # noqa no-handler ansible.builtin.include_tasks: "tasks/add_label.yml" with_items: - - stackhpc-ci + - automated - community-files loop_control: loop_var: label_name @@ -80,7 +80,7 @@ - name: Open pull request # noqa command-instead-of-shell no-handler ansible.builtin.shell: - cmd: 'gh pr create -f -B {{ community_manifest.prefix | default("") }}{{ community_manifest.branch }} -l stackhpc-ci --label community-files' + cmd: 'gh pr create -f -B {{ community_manifest.prefix | default("") }}{{ community_manifest.branch }} -l automated --label community-files' chdir: "{{ staging_path }}/{{ repository_manifest.name }}" when: community_copy.changed | bool diff --git a/terraform/github/repositories.tf b/terraform/github/repositories.tf index 15269a31..9be0d23e 100644 --- a/terraform/github/repositories.tf +++ b/terraform/github/repositories.tf @@ -33,14 +33,6 @@ resource "github_repository" "repositories" { } } -resource "github_issue_label" "stackhpc_ci_label" { - for_each = toset(flatten(values(var.repositories))) - repository = each.value - name = "stackhpc-ci" - color = "E6E2C0" - description = "Automated action performed by stackhpc-ci" -} - resource "github_issue_label" "automated_label" { for_each = toset(flatten(values(var.repositories))) repository = each.value