From a9b314efd486e03d35dcf32a30f65d07ea1289dd Mon Sep 17 00:00:00 2001 From: Matt Trachier Date: Tue, 19 Aug 2025 23:44:26 -0500 Subject: [PATCH] fix: create a new array to save labels (#36) Signed-off-by: matttrach --- .github/workflows/main-issue.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main-issue.yml b/.github/workflows/main-issue.yml index 98c496f..8f9c976 100644 --- a/.github/workflows/main-issue.yml +++ b/.github/workflows/main-issue.yml @@ -18,13 +18,12 @@ jobs: const repo = context.repo.repo; const owner = context.repo.owner; const pr = context.payload.pull_request; + const newLabels = ['internal/main'] const releaseLabel = pr.head.labels.find(label => label.name.startsWith('release/v')); - if releaseLabel { + if (releaseLabel) { const versionLabel = releaseLabel.name.replace('release/', 'version/'); - } else { - const versionLabel = '' + newLabels.push(versionLabel) } - // Create the main issue const newIssue = await github.rest.issues.create({ owner: owner, @@ -34,6 +33,6 @@ jobs: "Please add labels indicating the release versions eg. 'version/v0' \n\n" + "Please add comments for user issues which this issue addresses. \n\n" + "Description copied from PR: \n" + pr.body, - labels: ['internal/main', versionLabel], + labels: newLabels, assignees: ['terraform-maintainers'] });