ciena-blueplanet / pr-bumper

Bump the version of an npm package based on a GitHub Pull Request
MIT License
19 stars 17 forks source link

Doesn't work with squashed commits #138

Open sandersky opened 6 years ago

sandersky commented 6 years ago

Github has a merge and squash feature, which this project doesn't play well with. In lib/utils.js _getLastPr() makes the assumption that ALL merged pull requests commits will contain pull request # but for a squash and merge commit this doesn't hold true. See below for an example:

screen shot 2018-03-02 at 8 48 23 pm

In the above example pr-bumper will always skip over my squash and merge commits and thus it isn't using the correct pull request info for bumping.

job13er commented 6 years ago

@sandersky Do you have any suggestion of a way for pr-bumper to know what the last merge commit is in your situation?

job13er commented 6 years ago

My initial gut response is we should just add a warning to the README.md that if you want to use pr-bumper you can't enable the merge and squash feature, unless there's some way for pr-bumper to detect what PR the merge build is associated with. I don't think just querying the server for the most recent merged PR is a good idea as there could be multiple merged in quick succession.

notmessenger commented 6 years ago

I have opened https://github.com/ciena-blueplanet/pr-bumper/issues/144 to add such documentation.