ejoffe / spr

Stacked Pull Requests on GitHub
MIT License
796 stars 68 forks source link

Bug in PreserveTitleAndBody configuration? #261

Closed rvi closed 2 years ago

rvi commented 2 years ago

Hi,

First of all thanks for this great tool! I really appreciate it.

I think there is bug in the PreserveTitleAndBody feature. In your PR (https://github.com/ejoffe/spr/commit/e643a7908e5d8a9a732e64b9dd8ff5393418e330) you modify client.go to set the title and Body to nil. But if we look at the latest version of client.go on master it looks like this code has been removed, which cause a bug if PreserveTitleAndBody is true.

Thanks!

ejoffe commented 2 years ago

Not sure how this happened. Pull requests always welcome! To test it out you can build your own binaries. Either using the method stated in the readme, or you can install goreleaser and use make bin (my preferred approach). Personally I create aliases to the built binaries in the dist directory, instead of call them git-spr and git-amend, I just call them spr and amend. Then instead of running git spr, I just run spr to make sure I'm using my own built binaries instead of the installed ones. Hope that helps, let me know if you have any questions.

rvi commented 2 years ago

Thanks I'll have a PR soon then! Looks like it was removed in this PR

dko-slapdash commented 2 years ago

@ejoffe Would be super-cool if, despite preserveTitleAndBody=true, the tool updated the "Stack:" block in the end of PR description. I think this block needs to be up to date in all cases, no matter whether the user wants to overwrite the description or not.