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

DISMISS doesn't work #48

Open
Ana06 opened this issue May 19, 2021 · 1 comment
Open

DISMISS doesn't work #48

Ana06 opened this issue May 19, 2021 · 1 comment

Comments

@Ana06
Copy link

Ana06 commented May 19, 2021

It seems that the addPullRequestReview mutation doesn't support DISMISS. I think this is a GitHub bug and not a problem in the action itself. But as a result the action is broken. You can check this with the following queries in https://docs.github.com/en/graphql/overview/explorer:

query get_pr_id {
  repository(owner: "Ana06", name: "capa") {
    pullRequest(number: 2) {
      id
      number
      title
    }
  }
}

image

mutation add_review {
  addPullRequestReview(input: {
    pullRequestId: "MDExOlB1bGxSZXF1ZXN0NTk3NzMyNTAx",
    event: REQUEST_CHANGES,
    body: "I request changes!"}
  ) { clientMutationId }
}

image

mutation dismiss_review {
  addPullRequestReview(input: {
    pullRequestId: "MDExOlB1bGxSZXF1ZXN0NTk3NzMyNTAx",
    event: DISMISS,
    body: "I don't request changes!"}) {
    clientMutationId
  }
}

image

I reported it to GitHub 9 days ago. GitHub support has told me to use the dismisspullrequestreview mutation. They are still looking into it, so it might be that they fix addPullRequestReview to support DISMISS. Otherwise we could update the code to use dismisspullrequestreview, as it seems to be working properly. I can send a PR after #47 (to avoid merge conflicts).

Ana06 added a commit to Ana06/automatic-pull-request-review that referenced this issue May 27, 2021
`addPullRequestReview` doesn't work with `DISMISS`. Use
`dismisspullrequestreview` instead in this case.

Closes AndrewMusgrave#48
Ana06 added a commit to Ana06/automatic-pull-request-review that referenced this issue May 27, 2021
`Ana06/[email protected]` is a fork of https://github.com/AndrewMusgrave/automatic-pull-request-review which [fixes DISMISS](AndrewMusgrave#48) and provides an `allow_duplicate` option which allows to [only approve once](AndrewMusgrave#39).
@Ana06
Copy link
Author

Ana06 commented May 27, 2021

I have released Ana06/[email protected] which fixes this and includes #47: Ana06/automatic-pull-request-review@0.0.5...v0.1.0

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

1 participant