Skip to main content

Module threads

Module threads 

Source
Expand description

Review threads: fetching every thread of a PR, selecting the ones a listing asks for, and finding when a commit was pushed.

A thread’s handle is the database ID of its first comment. That is the number in the web UI’s #discussion_r... links, and it maps to both the GraphQL thread ID that resolving needs and the comment a reply goes under. Threads come 100 to a page, as do the comments of each thread, and every further page is fetched, so nothing is silently left out.

Modules§

condense
Condensing comment bodies for listing.
write
Replying to, resolving and unresolving threads.

Structs§

Comment
Context
Lines of the file around a thread’s line.
Counts
Filter
Which threads a listing shows. None means “either”.
PrThreads
A PR with every review thread, and its reviews and conversation comments when they were asked for.
Pushed
The commit an @SHA names, and when it was pushed to the PR.
Thread

Enums§

Kind
Lookup
Why an @SHA could not be used.
Side
Which side of the diff a thread’s lines are on.
Status

Functions§

counts
fetch
Fetches a PR’s threads, and with extra its reviews and conversation comments. None when the repository or PR does not exist.
keeps_finding
Whether a listing’s filter keeps an Entire finding, read the way a thread is: a stale finding is outdated, an agent’s (agent:...) a bot’s, and since goes by when it was raised. Its status is chosen when the findings are fetched.
pushed_at
Finds when sha (a prefix of at least 4 characters) was pushed to the PR: one of its commits, or a head it had before a force-push. Err says why sha names no such commit.
same_login
Whether login names author, ignoring case and a missing [bot].
select
The threads (then reviews and comments) a filter keeps, in order.