Goal
I want to use the GraphQL API to reply to a pull request review comment.
It is possible if the status of the review is PENDING, but when the status of the review is SUBMITTED, it is not possible. When I try it over the UI or the API V3 (REST), everything works fine.
This is an example of an reply to another PR-review comment.
This was the way to do it over the REST API.
What I have tried
I have tried to use the GraphQL addPullRequestReviewComment mutation.
Here is my mutation request
mutation {
addPullRequestReviewComment(
input: {
pullRequestReviewId: $pullRequestReviewId,
inReplyTo: $commentToReplyTo,
body: "test comment"
}) {
clientMutationId
comment{
body
}
}
}
I expect the above mutation to reply to another review comment, but I get this response:
{
"data": {
"addPullRequestReviewComment": null
},
"errors": [
{
"type": "VALIDATION",
"path": [
"addPullRequestReviewComment"
],
"locations": [
{
"line": 2,
"column": 3
}
],
"message": "Review has already been submitted."
}
]
}
I know that when you reply to another PR-Review comment of an already submitted review, you create a new review object for that comment.
But when I would try to solve my problem with that logic I would expect to find a reply_to
field or some other way to link to a comment of another PR-review comment on the addPullRequestReviewInput object.