From 1255b1244c7b038f7c4e702ca40ae000cb60cd40 Mon Sep 17 00:00:00 2001 From: matttrach Date: Mon, 25 Aug 2025 21:18:23 -0500 Subject: [PATCH 1/3] fix: use release please manifest Signed-off-by: matttrach --- .github/workflows/release.yml | 3 +++ .release-please-manifest.json | 3 +++ flake.lock | 6 +++--- release-please-config.json | 5 +++++ 4 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 .release-please-manifest.json create mode 100644 release-please-config.json diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f0a959c..76a64cf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,6 +23,9 @@ jobs: id: release-please with: release-type: go + target-branch: ${{ github.ref_name }} + config-file: release-please-config.json + manifest-file: .release-please-manifest.json # These run only if a release PR was opened or modified, so not when the PR is merged - uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 https://github.com/actions/github-script/commits/main name: wait-for-e2e diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..f0ec2a7 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + "./": "0.1.0" +} diff --git a/flake.lock b/flake.lock index 3476040..ab045cb 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1756035328, - "narHash": "sha256-vC7SslUBCtdT3T37ZH3PLIWYmTkSeppL5BJJByUjYCM=", + "lastModified": 1756128520, + "narHash": "sha256-R94HxJBi+RK1iCm8Y4Q9pdrHZl0GZoDPIaYwjxRNPh4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "6b0b1559e918d4f7d1df398ee1d33aeac586d4d6", + "rev": "c53baa6685261e5253a1c355a1b322f82674a824", "type": "github" }, "original": { diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..7bce179 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,5 @@ +{ + "packages": { + "./": {} + } +} From b3f1a9ee7901a4047a75438eeeb075cfa3f98bea Mon Sep 17 00:00:00 2001 From: matttrach Date: Mon, 25 Aug 2025 21:25:20 -0500 Subject: [PATCH 2/3] fix: hard code assignees Signed-off-by: matttrach --- .github/terraform-maintainers | 3 --- .github/workflows/backport.yml | 9 +-------- .github/workflows/main-issue.yml | 8 +------- 3 files changed, 2 insertions(+), 18 deletions(-) delete mode 100644 .github/terraform-maintainers diff --git a/.github/terraform-maintainers b/.github/terraform-maintainers deleted file mode 100644 index 84f609a..0000000 --- a/.github/terraform-maintainers +++ /dev/null @@ -1,3 +0,0 @@ -matttrach -jiaqiluo -HarrisonWAffel diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index a3b0404..082b142 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -19,14 +19,7 @@ jobs: const repo = context.repo.repo; const owner = context.repo.owner; const parentIssueBody = parentIssue.body; - - const fs = require('fs'); // Import the Node.js file system module - const fileContent = fs.readFileSync('.github/terraform-maintainers', 'utf8'); - const assignees = fileContent.split('\n').map(u => u.trim()).filter(Boolean); - if (assignees.length === 0) { - console.log('No assignees found in the team file.'); - return; - } + const assignees = ['matttrach', 'jiaqiluo', 'HarrisonWAffel'] if (!parentIssueBody) { core.setFailed('Issue body is empty.'); diff --git a/.github/workflows/main-issue.yml b/.github/workflows/main-issue.yml index 2a8d2cc..a17326c 100644 --- a/.github/workflows/main-issue.yml +++ b/.github/workflows/main-issue.yml @@ -24,13 +24,7 @@ jobs: const versionLabel = releaseLabel.name.replace('release/', 'version/'); newLabels.push(versionLabel); } - const fs = require('fs'); // Import the Node.js file system module - const fileContent = fs.readFileSync('.github/terraform-maintainers', 'utf8'); - const assignees = fileContent.split('\n').map(u => u.trim()).filter(Boolean); - if (assignees.length === 0) { - console.log('No assignees found in the team file.'); - return; - } + const assignees = ['matttrach', 'jiaqiluo', 'HarrisonWAffel'] // Note: can't get terraform-maintainers team, the default token can't access org level objects // Create the main issue From c5a60cf2718ba48a84094709bb8e49b25efaee0d Mon Sep 17 00:00:00 2001 From: matttrach Date: Mon, 25 Aug 2025 21:54:50 -0500 Subject: [PATCH 3/3] fix: consolidate release labels Signed-off-by: matttrach --- .github/workflows/backport.yml | 9 +++++---- .github/workflows/main-issue.yml | 9 ++++----- .github/workflows/release.yml | 3 +-- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index 082b142..874bd59 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -7,12 +7,13 @@ on: jobs: create-issue: runs-on: ubuntu-latest - if: ${{ github.event.label.name == 'version/v0' }} + if: ${{ startsWith(github.event.label.name, 'release/v') }} steps: - name: Create GitHub Issue uses: actions/github-script@v7 with: script: | + const labelName = context.payload.label.name; const parentIssue = context.payload.issue; const parentIssueTitle = parentIssue.title; const parentIssueNumber = parentIssue.number; @@ -39,9 +40,9 @@ jobs: const newIssue = await github.rest.issues.create({ owner: owner, repo: repo, - title: `Backport #${prNumber} to release/v0`, - body: `Backport #${prNumber} to release/v0 for #${parentIssueNumber}`, - labels: ['release/v0'], + title: `Backport #${prNumber} to ${labelName}`, + body: `Backport #${prNumber} to ${labelName} for #${parentIssueNumber}`, + labels: [labelName], assignees: assignees }); diff --git a/.github/workflows/main-issue.yml b/.github/workflows/main-issue.yml index a17326c..8d565c5 100644 --- a/.github/workflows/main-issue.yml +++ b/.github/workflows/main-issue.yml @@ -21,8 +21,7 @@ jobs: const newLabels = ['internal/main']; const releaseLabel = pr.labels.find(label => label.name.startsWith('release/v')); if (releaseLabel) { - const versionLabel = releaseLabel.name.replace('release/', 'version/'); - newLabels.push(versionLabel); + newLabels.push(releaseLabel); } const assignees = ['matttrach', 'jiaqiluo', 'HarrisonWAffel'] @@ -51,9 +50,9 @@ jobs: const newSubIssue = await github.rest.issues.create({ owner: owner, repo: repo, - title: `Backport #${pr.number} to release/v0`, - body: `Backport #${pr.number} to release/v0 for #${parentIssueNumber}`, - labels: ['release/v0'], + title: `Backport #${pr.number} to ${releaseLabel}`, + body: `Backport #${pr.number} to ${releaseLabel} for #${parentIssueNumber}`, + labels: [releaseLabel], assignees: assignees }); const subIssueId = newSubIssue.data.id; diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 76a64cf..cabdc7d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,8 +3,7 @@ name: release on: push: branches: - - release/v0 - - release/v1 + - release/v* jobs: release: