mbarkhau / bumpver

BumpVer: Automatic Versioning
https://github.com/mbarkhau/bumpver
MIT License
199 stars 36 forks source link

The git remote name is hard-coded to "origin" #171

Closed csadorf closed 2 years ago

csadorf commented 2 years ago

Observed behavior

I just ran into an issue where bumpver pushed to the wrong remote. This is because the git remote name is hard-coded to origin: https://github.com/mbarkhau/bumpver/blob/29f0925bd303e569461d3ebc46b9f8395da65b13/src/bumpver/vcs.py#L40-L41

Expected behavior

  1. The currently updated branch should push to the remote branch that is tracked by the current branch.
  2. The tag would be pushed to the same remote as the push in step 1.

Alternatives

mbarkhau commented 2 years ago

Thank you for reporting this issue.

I agree that the expected behaviour you describe is reasonable. I would like to avoid breaking anything, so I would amend your last suggestion, to say that bumpver will continue to push to origin, should that be one of the ambiguous remotes.

I think I will have some time to implement this in late February. If you want to take a stab at it in the meantime, you're more than welcome.

csadorf commented 2 years ago

If you want to take a stab at it in the meantime, you're more than welcome.

Happy to, however I don't have the capacity at the moment. Please feel free to assign it to me if it is ok for you that I can't work on it right away.