ci: triage the GitHub milestone after a release - #660
Conversation
The "Next Release" milestone is renamed to the published release tag and closed, while a new "Next Release" milestone gathers the issues and pull requests that remain open. Items without a milestone are left alone. This was a manual step of the release runbook. The logic lives in scripts/triage-milestone.sh so a maintainer can rehearse it with DRY_RUN or run it by hand, and completed steps are skipped so an interrupted run is safe to repeat. The releaser app needed a new Issues permission to write milestones.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #660 +/- ##
==========================================
+ Coverage 78.19% 78.21% +0.02%
==========================================
Files 239 239
Lines 18135 18135
==========================================
+ Hits 14180 14184 +4
+ Misses 3955 3951 -4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
|
||
| REPO=${REPO:-slackapi/slack-cli} | ||
| DRY_RUN=${DRY_RUN:-false} | ||
| UPCOMING_TITLE="Next Release" |
There was a problem hiding this comment.
🌟 praise: Thanks for keeping standard casing here!
| Credentials and secrets for the app can be stored as the following variables: | ||
|
|
||
| - `GH_APP_ID_RELEASER` | ||
| - `GH_APP_CLIENT_ID_RELEASER` |
| ### `scripts/` | ||
|
|
||
| Installation and setup scripts for various operating systems are available here. | ||
| Installation and setup scripts for various operating systems are available here, | ||
| along with scripts that support the release process. |
There was a problem hiding this comment.
💡 thought: I'm curious to separate outward facing scripts from maintenance details but think we can discuss this more later:
- .github/scripts/triage-milestone.sh
- $ slack maintainer triage-milestone
There was a problem hiding this comment.
@zimeg I agree. This has crossed my mind as well. Let's merge this PR and open a discussion around this one.
| ```sh | ||
| $ DRY_RUN=true ./scripts/triage-milestone.sh v4.8.0 | ||
| $ ./scripts/triage-milestone.sh v4.8.0 | ||
| ``` |
There was a problem hiding this comment.
note: It's nice that we can run this script manually as well. 👌🏻
| ### `scripts/` | ||
|
|
||
| Installation and setup scripts for various operating systems are available here. | ||
| Installation and setup scripts for various operating systems are available here, | ||
| along with scripts that support the release process. |
There was a problem hiding this comment.
@zimeg I agree. This has crossed my mind as well. Let's merge this PR and open a discussion around this one.
|
Thanks for the reviews @zimeg 🙇🏻 I'll open a discussion around how we want to separate maintainer and automation scripts! 🚢 |
Changelog
No user-facing changes. This is release automation only.
Summary
This pull request automates the GitHub milestone triage that currently happens by hand after every release.
Next Releasemilestone to the release tag, closes it, and creates a freshNext ReleaseNext ReleaseThe logic lives in
scripts/triage-milestone.shrather than inline in the workflow so a maintainer can preview it, rehearse it, or recover by hand when CI fails. Completed steps are skipped, so an interrupted run is safe to repeat.Preview
A dry run against this repository, which makes no changes:
Testing
Note: Only the DRY RUN has been verified. Optionally, we can test on a scratch repository. Otherwise, we can merge this PR and test on the next release.
Next Releasemilestone there with one open and one closed issue, then:v0.1.0is closed and holds the closed issue, and that a new openNext Releaseholds the open issue.No "Next Release" milestone was found, so nothing is triagedwithout creating a duplicate.403:$ gh api /orgs/slackapi/installations \ --jq '.installations[] | select(.app_slug=="slack-cli-releaser") | .permissions'Notes
Issues: Read and writewas added and granted to installation.Next Releaseis now hard-coded in three places:release.yml,dependencies.yml, and this script. Renaming it breaks all three together, which the maintainer's guide now warns about.vX.Y.Zregex as a second guard.Requirements