Using graphql api to create multi-line threaded comment at a specific commit #30317
Unanswered
ldelossa
asked this question in
API and Webhooks
Replies: 1 comment 2 replies
-
This is even more relevant with the deprecation/removal of diff-relative position APIs. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello.
I'm writing gh.nvim which is a Neovim plugin which integrates with the GitHub API.
I'm trying to determine how to create a multiline threaded message on a particular commit.
It's possible to make a non-multiline threaded comment with the
addPullRequestReviewComment
endpoint. This takes acommitOID
as part of its input. ThiscommitOID
shows up in the comment'soriginalCommit
field and all is well.However, that endpoint's field does not take a line range. The only graphql mutation endpoint which takes a line range is
addPullRequestReviewThread
. However, this endpoint does not take acommitOID
and, to my knowledge, always takes itsbody
field and creates an implicit comment which both it'scommit
andoriginalCommit
fields pointing to the pull request's HEAD.This doesn't seem to be the case when I attempt this in the web UI. I can start an arbitrary review, go to a specific commit, and create a multiline object. What I receive back something similar to:
As you can see, the thread has a comment created with an "originalCommit" pointing to the parent of that pull request's HEAD.
Beta Was this translation helpful? Give feedback.
All reactions