merge-bot
merge-bot copied to clipboard
Not detecting reviews?
Describe the bug Hi again @squalrus, sorry to bombard you with PR's and issues 😅
Seeing a weird behaviour and was hoping you could help me figure out what is happening? I had this PR where reviewers were auto assigned from CODEOWNERS, but once all the conditions were met the auto merge didn't happen.
Before approvals it said Waiting on code owner review from limejump/platform and/or limejump/sig-kubernetes.
After approvals I see this in the logs:
pull: {"labels":["automerge","ready"],"owner":"limejump","pull_number":1375,"reviews":[],"ref":"heads/automerge-fixes","repo":"k8s-gitops","requested_reviewers":[],"checks":{}}
Notice how reviews
and requested_reviewers
are just an empty list! So all the jobs passed, but it didn't merge.
Any ideas / extra things to check?
It must be this line of code: https://github.com/squalrus/merge-bot/blob/7cc41ca7a2cba9e8ede4381d0f2716de7f43b12c/lib/pull.js#L26
if (Object.keys(this.reviews).length == 0) {
return false;
}
In our logs reviews
is an empty array (for some reason), so this check returns false
.
Yeah, I've been having a poke about in the Github API as well. Seems in this specific flow where the reviewers are automatically assigned by CODEOWNERS and it happens to be a group, then when this event happens:
Seem to end up with no "requested" reviewers:
But if you call the endpoint to list the reviews:
So maybe it is because they were not explicitly "requested" as reviewers?
@aaron-trout and @bartelemi -- no problem with the PRs and issues -- I appreciate the help!
I am working on getting your PRs in and then can look at this issue.