Skip to content

Fix force-push guard comparing against HEAD instead of base branch#26

Merged
theoephraim merged 3 commits into
mainfrom
fix/force-push-guard
Apr 21, 2026
Merged

Fix force-push guard comparing against HEAD instead of base branch#26
theoephraim merged 3 commits into
mainfrom
fix/force-push-guard

Conversation

@theoephraim

Copy link
Copy Markdown
Member

Summary

  • The force-push safeguard added in Harden security across publishing, auth, and input validation #24 compared the push target against HEAD, but pushWithToken is called after checking out the version PR branch — so HEAD === branch always triggered the error
  • Now compares against config.baseBranch instead, which is the actual base branch (e.g. main)

Test plan

  • Verify bumpy ci release creates/updates the version PR without error

🤖 Generated with Claude Code

The guard was comparing the push target against HEAD, but pushWithToken
is called after checking out the version PR branch, so HEAD === branch
always triggered the error. Use config.baseBranch instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bumpy-bot

bumpy-bot commented Apr 21, 2026

Copy link
Copy Markdown
Collaborator

bumpy-frog

The changes in this PR will be included in the next version bump.

patch Patch releases

  • @varlock/bumpy 0.0.2 → 0.0.3

Bump files in this PR

Click here if you want to add another bump file to this PR


This comment is maintained by bumpy.

theoephraim and others added 2 commits April 21, 2026 00:40
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Split the regex and add an inline disable comment for the intentional
control character check.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@theoephraim theoephraim merged commit 87b29f1 into main Apr 21, 2026
2 checks passed
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