bug: update PR runs even if PR is up-to-date with main branch #304
Labels
bot: merge on green
priority: p1
Important issue which blocks shipping the next release. Will be fixed prior to next release.
🚨
This issue needs some love.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Now that merge-on-green is a trusted contributor (hooray, thanks @chingor13 and @sofisl) I noticed that we never merge PRs, because every time we update a branch it re-kicks-off-tests.
There seem to be two potential fixes, a quick fix is to only
update
the branch if the merge fails:This works because when an attempt is made to merge a PR that isn't up-to-date, the following error is thrown:
A 2020-02-20T06:20:50.733Z merge_on_green mz3c7l1c3kdv { HttpError: Pull Request is not mergeable merge_on_green mz3c7l1c3kdv A 2020-02-20T06:20:50.733Z merge_on_green mz3c7l1c3kdv at response.text.then.message (/srv/functions/node_modules/@octokit/request/dist-node/index.js:66:23) merge_on_green mz3c7l1c3kdv A 2020-02-20T06:20:50.733Z merge_on_green mz3c7l1c3kdv at process._tickCallback (internal/process/next_tick.js:68:7) merge_on_green mz3c7l1c3kdv A 2020-02-20T06:20:50.733Z merge_on_green mz3c7l1c3kdv name: 'HttpError', merge_on_green mz3c7l1c3kdv
A better fix might be to eventually determine whether or not a branch is up-to-date with
master
, and only callupdate
if necessary.I suggest that we land the quick fix first, but with our sights set to the more thorough fix.
The text was updated successfully, but these errors were encountered: