Expand description
Reading what other people said on a pull request or an issue, 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.
Re-exports§
pub use crate::model::Author;
Structs§
- Gathered
- What was found, and what was passed over.
- Issue
Text - An issue as a prompt carries it, and what was left out of it.
- Pending
- One thing somebody said that spar has not answered.
- RawComment
- RawThread
- Said
- Something somebody other than the viewer said on a pull request after a given time: a message in a review thread, a review body, or a comment.
- Thread
Comments
Enums§
- Comment
Kind - 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.
- issue_
for_ prompt - The body as filed, then what was said on the issue since.
- later_
than - Strictly after, in GitHub’s fixed width UTC form. Anything malformed is not
after: the fail safe direction for a trigger is silence, as it is for
answered_after. - mentioned_
in - Whether a person asked for the viewer by name after
since, in any ofrows: review comments, reviews, or comments as the REST API returns them. The viewer’s own words do not count, nor a bot’s, nor a spar review: none of them is somebody asking. - mentions
- Whether
textasks for the viewer by name:@viewer, or@org/teamfor a teamin_teamsays the viewer is in. A team nobody could check counts, as it does for a review request. An@inside a word is an email address or code, and a login that runs on past the viewer’s is somebody else’s. - parse_
review_ threads - Pull the threads out of whatever
gh api graphql --paginateprinted. - said_
in_ threads - What the threads hold that others said after
since. Resolved threads are included: an author who replied “fixed in abc1234” and resolved the thread has said exactly the thing a second look exists to check. - said_
since - Everything others said on a pull request after
since, oldest first. - same_
login - GitHub logins are case insensitive, and
gh api userand the GraphQLauthor.loginhave 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.