-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add bumpver pre-commit #688
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #688 +/- ##
==========================================
- Coverage 80.73% 75.79% -4.95%
==========================================
Files 49 59 +10
Lines 3415 4767 +1352
==========================================
+ Hits 2757 3613 +856
- Misses 658 1154 +496
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
5be8367
to
1000569
Compare
f034ff1
to
cef9456
Compare
@unkcpz @superstar54 friendly ping (I know you're busy) to review this so that we can start testing this for the releases. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @danielhollas I looked it this morning. I am not very familiar with this. But LGTM!
@superstar54 thanks for taking a look. Feel free to merge so you can test it while doing releases. |
This bumpver is configured to automatically run bumpver_pre_commit.sh script before it makes the release commit. The script checks for common mistakes, such as making a release commit in a wrong branch, or trying to push to a wrong remote. This is an initial implementation that should be made more robust in the future.
cef9456
to
00873c0
Compare
This is the last piece in the release workflow.
The newly added
bumpver_pre_commit.sh
script is configured to run automatically by bumpverbefore it creates the release commit.
We check for common mistakes, such as making a release commit
in a wrong branch, or trying to push to a wrong remote.
For now, only two checks are implemented:
Check that the current branch name matches either
release/*
orsupport/*
Check that the remote
origin
is pointing to the origin repository,and not a fork. Note however that this assumes that
origin
is the default remotewhere new branches are pushed. If the user configured a different default remote,
this check will not save them in the current implementation.
Future work:
although this rule should only apply to
release/*
branches, notsupport/*
branchesIt would be great if at least some of these checks were handled by bumpver itself:
Restricting releases from branch: mbarkhau/bumpver#198
Restricting releases to specified remote: mbarkhau/bumpver#234