Skip to main content

Module comments

Module comments 

Source
Expand description

Reading what other people said on a pull request, and answering it.

This is the only GraphQL in spar, and it is one read and one mutation. Everything else here is REST, which keeps the surface that can fail on an old gh or a locked down Enterprise token down to two calls.

GraphQL is not a preference. REST has always served a pull request’s inline comments and has never served whether the thread they sit in is resolved, and resolved is the whole point: it is the one signal that is authoritative, shared between machines, and free.

Structs§

Author
Gathered
What was found, and what was passed over.
Pending
One thing somebody said that spar has not answered.
RawComment
RawThread
ThreadComments

Enums§

CommentKind
Where a comment lives, which is what decides how spar can answer it.

Functions§

answered_after
Whether anything the viewer wrote lands after at.
gather
Everything on this pull request or issue that spar has not answered.
parse_review_threads
Pull the threads out of whatever gh api graphql --paginate printed.
same_login
GitHub logins are case insensitive, and gh api user and the GraphQL author.login have not always agreed on casing. A mismatch here means spar reads its own replies as requests, which does not terminate.
thread_wants_an_answer
Whether a thread still wants an answer.
threads_from_rest
Rebuild threads from the REST inline comments, for a host where the GraphQL query will not run.