Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/terraform-maintainers

This file was deleted.

18 changes: 6 additions & 12 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,20 @@ 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;
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.');
Expand All @@ -46,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
});

Expand Down
17 changes: 5 additions & 12 deletions .github/workflows/main-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,9 @@ 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);
}
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;
newLabels.push(releaseLabel);
}
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
Expand All @@ -57,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;
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ name: release
on:
push:
branches:
- release/v0
- release/v1
- release/v*

jobs:
release:
Expand All @@ -23,6 +22,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
Expand Down
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"./": "0.1.0"
}
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"packages": {
"./": {}
}
}
Loading