Skip to content

feat(release): the version bump goes through a pull request - #48

Merged
maksimtech merged 2 commits into
mainfrom
feat/release-through-pr
Oct 12, 2026
Merged

maksimtech merged 2 commits into
mainfrom
feat/release-through-pr

Conversation

@maksimtech

Copy link
Copy Markdown
Owner

Preparation for removing the owner's bypass from the main ruleset: bump_version.py committed the bump on main and release.py began with git push origin main, which a ruleset without bypass refuses.

  • bump_version.py: after the suite, commits the bump on release/<version>; when asked, pushes that branch only, switches back to main and opens the pull request with auto-merge (squash) if gh is there and origin is github.com/maksimtech/patchradar.
  • release.py: pushes nothing. After the confirmation, check_main_published() refuses another branch, a dirty tree, a main ahead of the remote ("the bump has to arrive through its pull request") or behind it ("git pull"), and returns the commit; gh release create <version> --target <that commit>. An aborted run still touches nothing.
  • RELEASING.md and CLAUDE.md describe the new path.

tests/test_release_through_pr.py runs the real functions against a real bare remote and a clone; nothing of git is simulated and GitHub is not asked. Full suite green locally.

🤖 Generated with Claude Code

main is about to take pull requests only, the owner included, after a
cloud session pushed straight to it with the owner's account.
bump_version.py committed the bump on main and release.py began with
git push origin main, which that rule refuses.

bump_version.py now commits the bump on release/<version>, pushes that
branch and opens its pull request with auto-merge (when gh is there and
origin is this repository on GitHub). release.py pushes nothing: after
the confirmation it checks that the local main is clean and is the
remote's, neither ahead nor behind, and creates the GitHub release on
that exact commit with --target. Tested against a real bare remote.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread scripts/bump_version.py
url = subprocess.run(
["git", "remote", "get-url", "origin"], capture_output=True, text=True, check=True, cwd=cwd
).stdout
return "github.com" in url and RELEASE_REPO in url
@codspeed

codspeed Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

⚠️ 11 benchmarks spent significant time in system calls

System calls cannot be consistently instrumented, so they are not included in the measure, which understates the real cost. Please switch to the Walltime instrument to accurately measure system calls.

Measurement and system calls

✅ 17 untouched benchmarks


Comparing feat/release-through-pr (6f2bc04) with main (fc6c332)

Open in CodSpeed

…ract asks

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@sonarqubecloud

Copy link
Copy Markdown

@maksimtech
maksimtech merged commit bdf4981 into main Oct 12, 2026
23 of 25 checks passed
@maksimtech
maksimtech deleted the feat/release-through-pr branch October 12, 2026 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants