ghprb
ghprb copied to clipboard
ghprb Github Pull Request Merger should update state before merge attempted
Currently, if a build is successful, an appropriately configured Github Pull Request Merger attempts the merge. But if the target branch is protected with status checks and some other required status is a failure, the merge fails and ghprb posts a 'failure' status for the build.
This is misleading and logically incorrect, since the build did succeed. I would suggest that ghprb post a build 'success' status BEFORE the merge is attempted. If the merge fails, then the ghprb status could be overwritten with a different description, or a 'failure' status could be posted with a different context that is intended only to reflect the outcome of the attempted merge - not the build.
See also https://stackoverflow.com/questions/47891784/jenkins-github-pull-request-merger-does-not-respect-statuses