Skip to main content

review_threads

Creates, updates, deletes, gets or lists a review_threads resource.

Overview

Namereview_threads
TypeResource
Idgithub.pulls.review_threads

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
idstringThe GraphQL node ID of the thread.
commentsobjectThe comments in the thread (total_count, nodes[] with id, url, body, created_at, author.login).
diff_sidestringLEFT or RIGHT.
is_collapsedboolean
is_outdatedbooleanWhether the thread is on a line that has since changed.
is_resolvedboolean
lineintegerThe line in the diff the thread is attached to.
pathstringThe file the thread is attached to.
resolved_byobjectThe user who resolved the thread (login).
start_lineintegerThe first line of a multi-line comment range.
subject_typestringLINE or FILE.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectowner, repo, pull_numberReview comment threads on a pull request with their resolved / outdated state and the comments in each thread. Backed by the GitHub GraphQL API (pullRequest.reviewThreads); the REST API does not expose thread resolution.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
ownerstringThe account owner of the repository.
pull_numberintegerThe number that identifies the pull request.
repostringThe name of the repository.

SELECT examples

Review comment threads on a pull request with their resolved / outdated state and the comments in each thread. Backed by the GitHub GraphQL API (pullRequest.reviewThreads); the REST API does not expose thread resolution.

SELECT
id,
comments,
diff_side,
is_collapsed,
is_outdated,
is_resolved,
line,
path,
resolved_by,
start_line,
subject_type
FROM github.pulls.review_threads
WHERE owner = '{{ owner }}' -- required
AND repo = '{{ repo }}' -- required
AND pull_number = '{{ pull_number }}' -- required
;