Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minimumApprovals is never checked #992

Open
stefdelec opened this issue Mar 4, 2021 · 4 comments
Open

minimumApprovals is never checked #992

stefdelec opened this issue Mar 4, 2021 · 4 comments

Comments

@stefdelec
Copy link

I have my config as:


updateBranch: true
deleteBranchAfterMerge: true
reportStatus: true

minApprovals:
  CONTRIBUTOR: 1
  OWNER: 1
  COLLABORATOR: 1
blockingLabels:
  - wip

image

And
image

I don't understand why it is not checked.

@stefdelec
Copy link
Author

I even tried
image

@AnandChowdhary
Copy link

@bobvanderlinden I'm having the same issue, but I'm certain I'm doing something wrong. Any chance you have a few moments to help us reproduce, triage, and fix this? Thanks a ton for a great project!

@bobvanderlinden
Copy link
Owner

bobvanderlinden commented Jul 12, 2022

What is the exact role of the reviewer? You can check this using:

query { 
  repository(name: ***, owner: ***) {
    pullRequest(number: 123) {
      reviews(first: 1) {
        nodes {
          authorAssociation
        }
      }
    }
  }
}

Is it one of:

CommentAuthorAssociation.NONE,
CommentAuthorAssociation.FIRST_TIMER,
CommentAuthorAssociation.FIRST_TIME_CONTRIBUTOR,
CommentAuthorAssociation.CONTRIBUTOR,
CommentAuthorAssociation.COLLABORATOR,
CommentAuthorAssociation.MEMBER,
CommentAuthorAssociation.OWNER

That said, I would also recommend checking out GitHub merge queues. It is in beta, but covers most use-cases of probot-auto-merge without self-hosting an application.

@AnandChowdhary
Copy link

Thanks @bobvanderlinden!

The API response says `CONTRIBUTOR`
{
  "data": {
    "repository": {
      "pullRequest": {
        "reviews": {
          "nodes": [
            {
              "authorAssociation": "CONTRIBUTOR"
            }
          ]
        }
      }
    }
  }
}
And the `github/auto-merge.yml` says 1 for contributor:
updateBranch: true
deleteBranchAfterMerge: true
reportStatus: true
minApprovals:
  OWNER: 0
  MEMBER: 1
  COLLABORATOR: 1
  CONTRIBUTOR: 1
  FIRST_TIMER: 1
  FIRST_TIME_CONTRIBUTOR: 1
  NONE: 1
blockingLabels:
  - blocked
mergeCommitMessage: "{title} (#{number})"

And here's me approving :)

CleanShot 2022-07-12 at 13 08 53@2x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants