module GitHub.Endpoints.PullRequests.Reviews
( pullRequestReviewsR
, pullRequestReviews
, pullRequestReviews'
, pullRequestReviewR
, pullRequestReview
, pullRequestReview'
, pullRequestReviewCommentsR
, pullRequestReviewCommentsIO
, pullRequestReviewCommentsIO'
, module GitHub.Data
) where
import GitHub.Data
import GitHub.Data.Id (Id)
import GitHub.Internal.Prelude
import GitHub.Request
(Request, executeRequest', executeRequestMaybe)
import Prelude ()
pullRequestReviewsR
:: Name Owner
-> Name Repo
-> Id PullRequest
-> FetchCount
-> Request k (Vector Review)
pullRequestReviewsR owner repo prid =
pagedQuery
[ "repos"
, toPathPart owner
, toPathPart repo
, "pulls"
, toPathPart prid
, "reviews"
]
[]
pullRequestReviews
:: Name Owner
-> Name Repo
-> Id PullRequest
-> IO (Either Error (Vector Review))
pullRequestReviews owner repo prid =
executeRequest' $ pullRequestReviewsR owner repo prid FetchAll
pullRequestReviews'
:: Maybe Auth
-> Name Owner
-> Name Repo
-> Id PullRequest
-> IO (Either Error (Vector Review))
pullRequestReviews' auth owner repo pr =
executeRequestMaybe auth $ pullRequestReviewsR owner repo pr FetchAll
pullRequestReviewR
:: Name Owner
-> Name Repo
-> Id PullRequest
-> Id Review
-> Request k Review
pullRequestReviewR owner repo prid rid =
query
[ "repos"
, toPathPart owner
, toPathPart repo
, "pulls"
, toPathPart prid
, "reviews"
, toPathPart rid
]
[]
pullRequestReview
:: Name Owner
-> Name Repo
-> Id PullRequest
-> Id Review
-> IO (Either Error Review)
pullRequestReview owner repo prid rid =
executeRequest' $ pullRequestReviewR owner repo prid rid
pullRequestReview'
:: Maybe Auth
-> Name Owner
-> Name Repo
-> Id PullRequest
-> Id Review
-> IO (Either Error Review)
pullRequestReview' auth owner repo prid rid =
executeRequestMaybe auth $ pullRequestReviewR owner repo prid rid
pullRequestReviewCommentsR
:: Name Owner
-> Name Repo
-> Id PullRequest
-> Id Review
-> Request k [ReviewComment]
pullRequestReviewCommentsR owner repo prid rid =
query
[ "repos"
, toPathPart owner
, toPathPart repo
, "pulls"
, toPathPart prid
, "reviews"
, toPathPart rid
, "comments"
]
[]
pullRequestReviewCommentsIO
:: Name Owner
-> Name Repo
-> Id PullRequest
-> Id Review
-> IO (Either Error [ReviewComment])
pullRequestReviewCommentsIO owner repo prid rid =
executeRequest' $ pullRequestReviewCommentsR owner repo prid rid
pullRequestReviewCommentsIO'
:: Maybe Auth
-> Name Owner
-> Name Repo
-> Id PullRequest
-> Id Review
-> IO (Either Error [ReviewComment])
pullRequestReviewCommentsIO' auth owner repo prid rid =
executeRequestMaybe auth $ pullRequestReviewCommentsR owner repo prid rid