[PR #148] [MERGED] [release] Wizard polish: branch switching, tomllib, run link #152

Closed
opened 2026-10-13 19:48:02 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Glitchy-Sheep/boosty-downloader/pull/148
Author: @Glitchy-Sheep
Created: 8/15/2026
Status: ✅ Merged
Merged: 8/15/2026
Merged by: @Glitchy-Sheep

Base: main ← Head: chore/release-wizard-polish


📝 Commits (4)

  • e54751d feat: Offer switching to main when the release starts elsewhere
  • dab1cfc refactor: Read the project version with tomllib
  • 13f570b feat: Link straight to the running release workflow after tagging
  • 1a03b74 docs: Sync the releasing guide with the wizard behavior

📊 Changes

2 files changed (+75 additions, -10 deletions)

View changed files

📝 docs/development/04-releasing.md (+2 -3)
📝 scripts/release.py (+73 -7)

📄 Description

Summary

Three quality-of-life fixes for the release wizard. It now offers to switch to main instead of refusing when started elsewhere, reads the project version with tomllib instead of a regex, and after pushing the tag prints the direct link to the workflow run it has just started.

Problem

  • Starting the wizard from a feature branch (or the release branch during release:tag) ended with a hard error and a manual git checkout main
  • The version was fished out of pyproject.toml with a regex - fragile against any formatting or layout change
  • After the tag push the wizard linked to the workflow's runs list, not to the run itself - watching the release meant finding it by hand

Fix

  • Both flows ask Switch to main? [y/N] and switch themselves; the offer appears only on a clean tree (-uno, same policy as the tree check), so tracked edits never travel between branches - declining keeps the old refusal
  • _current_version parses the file with tomllib; writing stays regex-based on purpose - stdlib cannot write TOML preserving formatting
  • After git push origin vX.Y.Z the wizard polls gh run list briefly (the run spawns a few seconds after the push), matches it by headBranch == vX.Y.Z and prints the exact run URL; the run page shows the whole three-job pipeline live - on timeout or any gh hiccup it falls back to the old runs-list link
  • docs/development/04-releasing.md synced: the manual git checkout main step is gone

Verification

  • Live wizard runs from a scratch branch: agree - warns, switches, fast-forwards and continues preflight; decline - old refusal, branch untouched; CHANGELOG edits on a foreign branch - refused with an explanation, no prompt
  • tomllib and the old regex return the same version on the live pyproject.toml
  • Run resolution finds the historical v3.4.0 run (the exact URL) in 1 second; a nonexistent tag falls back to the runs list after the poll window
  • task check green (ruff, format, pyright), 107 unit tests pass; test:api is flaky against the live Boosty network today and is unrelated - this PR touches only scripts/ and docs

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Glitchy-Sheep/boosty-downloader/pull/148 **Author:** [@Glitchy-Sheep](https://github.com/Glitchy-Sheep) **Created:** 8/15/2026 **Status:** ✅ Merged **Merged:** 8/15/2026 **Merged by:** [@Glitchy-Sheep](https://github.com/Glitchy-Sheep) **Base:** `main` ← **Head:** `chore/release-wizard-polish` --- ### 📝 Commits (4) - [`e54751d`](https://github.com/Glitchy-Sheep/boosty-downloader/commit/e54751daf0c5e617797b982aa1fe45124fbbcc40) feat: Offer switching to main when the release starts elsewhere - [`dab1cfc`](https://github.com/Glitchy-Sheep/boosty-downloader/commit/dab1cfc70166777dc54a724c927e639bfcae2a3c) refactor: Read the project version with tomllib - [`13f570b`](https://github.com/Glitchy-Sheep/boosty-downloader/commit/13f570b64c500163d0b55761090cd834542b3805) feat: Link straight to the running release workflow after tagging - [`1a03b74`](https://github.com/Glitchy-Sheep/boosty-downloader/commit/1a03b742d355fd7f6a2ed8c6700edaff21cbbf43) docs: Sync the releasing guide with the wizard behavior ### 📊 Changes **2 files changed** (+75 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `docs/development/04-releasing.md` (+2 -3) 📝 `scripts/release.py` (+73 -7) </details> ### 📄 Description ## Summary Three quality-of-life fixes for the release wizard. It now offers to switch to `main` instead of refusing when started elsewhere, reads the project version with `tomllib` instead of a regex, and after pushing the tag prints the direct link to the workflow run it has just started. ## Problem - Starting the wizard from a feature branch (or the release branch during `release:tag`) ended with a hard error and a manual `git checkout main` - The version was fished out of `pyproject.toml` with a regex - fragile against any formatting or layout change - After the tag push the wizard linked to the workflow's runs list, not to the run itself - watching the release meant finding it by hand ## Fix - Both flows ask `Switch to main? [y/N]` and switch themselves; the offer appears only on a clean tree (`-uno`, same policy as the tree check), so tracked edits never travel between branches - declining keeps the old refusal - `_current_version` parses the file with `tomllib`; writing stays regex-based on purpose - stdlib cannot write TOML preserving formatting - After `git push origin vX.Y.Z` the wizard polls `gh run list` briefly (the run spawns a few seconds after the push), matches it by `headBranch == vX.Y.Z` and prints the exact run URL; the run page shows the whole three-job pipeline live - on timeout or any gh hiccup it falls back to the old runs-list link - `docs/development/04-releasing.md` synced: the manual `git checkout main` step is gone ## Verification - Live wizard runs from a scratch branch: agree - warns, switches, fast-forwards and continues preflight; decline - old refusal, branch untouched; CHANGELOG edits on a foreign branch - refused with an explanation, no prompt - `tomllib` and the old regex return the same version on the live `pyproject.toml` - Run resolution finds the historical `v3.4.0` run (the exact URL) in 1 second; a nonexistent tag falls back to the runs list after the poll window - `task check` green (ruff, format, pyright), 107 unit tests pass; `test:api` is flaky against the live Boosty network today and is unrelated - this PR touches only `scripts/` and docs --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-13 19:48:02 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Glitchy-Sheep/boosty-downloader#152
No description provided.