Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: automate release issue creation #12741

Merged
merged 11 commits into from
Dec 6, 2024
Merged

Conversation

galargh
Copy link
Contributor

@galargh galargh commented Nov 28, 2024

Related Issues

Resolves #12477

Proposed Changes

This PR implements the release issue creation automation.

Firstly, it turns the RELEASE_ISSUE_TEMPLATE.md into a Go template. This allowed us to use variable substitution and conditional blocks, which were the prerequisites for release issue rendering. We used variable substitution inline. We hid the conditional block starts/ends in HTML comment tags (<!--, -->). We kept the modifications to a minimum and ensured that the template could still be copied manually and updated using almost the same steps as before.

Secondly, we added a new command - create-issue - to the cmd/release tool. The command accepts a number of flags, values of which are then used to render the issue template. Before creating a new issue, the command checks whether if it already exists. It requires GITHUB_TOKEN with write access to issues to be present in the environment. The command doesn't operate in interactive mode. It expects all the data to be provided via flags instead.

Finally, we created a new GitHub Actions workflow which accepts exactly the same inputs as the command and calls it to create the new release issue. It can be triggered on demand.

Additional Info

An example of the release issue created using release create-issue --type node --tag 1.2.3 --level patch --network-upgrade 23: galargh/.github#73

Checklist

Before you mark the PR ready for review, please make sure that:

@galargh galargh added the skip/changelog This change does not require CHANGELOG.md update label Nov 28, 2024
@galargh galargh changed the title feat: automate release issue creation ci: automate release issue creation Nov 28, 2024
@galargh galargh requested a review from BigLep December 2, 2024 17:34
@galargh galargh marked this pull request as ready for review December 2, 2024 17:34
@BigLep
Copy link
Member

BigLep commented Dec 3, 2024

@galargh : this is awesome! I spent quite a bit of time with this today when working to generate the 1.32.0 release issue. A made a set of changes based on this experience in #12749 which is targeting this branch.

* ci: automate release issue creation from v1.32.0 learnings

* Self-review feedback from looking at #12749

* Fix String contains ordering bugs.

* chore: run gofmt

---------

Co-authored-by: galargh <piotr.galar@gmail.com>
@galargh
Copy link
Contributor Author

galargh commented Dec 4, 2024

@BigLep Lovely! Thank you for that. I now merged your follow-up into this PR. Let me know if there's anything else we should take care of in this iteration.

Copy link
Member

@BigLep BigLep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me as I already engaged a lot with this, but it would be good to have @rjan90 or @rvagg approve so they're aware. Thanks!

cmd/release/main.go Outdated Show resolved Hide resolved
@BigLep BigLep requested a review from rjan90 December 5, 2024 01:19
cmd/release/main.go Outdated Show resolved Hide resolved
cmd/release/main.go Outdated Show resolved Hide resolved
cmd/release/main.go Outdated Show resolved Hide resolved
Copy link
Member

@rvagg rvagg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems ok to me, some Go cleanup suggestions left inline

BigLep and others added 2 commits December 5, 2024 10:09
Co-authored-by: Rod Vagg <rod@vagg.org>
Co-authored-by: Rod Vagg <rod@vagg.org>
@BigLep BigLep merged commit dff8bfd into master Dec 6, 2024
83 checks passed
@BigLep BigLep deleted the ci/release-issue-automation branch December 6, 2024 05:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip/changelog This change does not require CHANGELOG.md update
Projects
Status: 🎉 Done
Development

Successfully merging this pull request may close these issues.

lotus-releaser: release issue creation
3 participants