----------------------------------------------------------------------------- -- | -- License : BSD-3-Clause -- Maintainer : Oleg Grenrus -- -- The pull request review comments API as described at -- . module GitHub.Endpoints.PullRequests.ReviewComments ( pullRequestReviewCommentsIO, pullRequestReviewCommentsR, pullRequestReviewComment, pullRequestReviewCommentR, module GitHub.Data, ) where import Data.Vector (Vector) import GitHub.Data import GitHub.Request -- | All the comments on a pull request with the given ID. -- -- > pullRequestReviewComments "thoughtbot" "factory_girl" (Id 256) pullRequestReviewCommentsIO :: Name Owner -> Name Repo -> Id PullRequest -> IO (Either Error (Vector Comment)) pullRequestReviewCommentsIO user repo prid = executeRequest' $ pullRequestReviewCommentsR user repo prid Nothing -- | List comments on a pull request. -- See pullRequestReviewCommentsR :: Name Owner -> Name Repo -> Id PullRequest -> Maybe Count -> Request k (Vector Comment) pullRequestReviewCommentsR user repo prid = PagedQuery ["repos", toPathPart user, toPathPart repo, "pulls", toPathPart prid, "comments"] [] -- | One comment on a pull request, by the comment's ID. -- -- > pullRequestReviewComment "thoughtbot" "factory_girl" (Id 301819) pullRequestReviewComment :: Name Owner -> Name Repo -> Id Comment -> IO (Either Error Comment) pullRequestReviewComment user repo cid = executeRequest' $ pullRequestReviewCommentR user repo cid -- | Query a single comment. -- See pullRequestReviewCommentR :: Name Owner -> Name Repo -> Id Comment -> Request k Comment pullRequestReviewCommentR user repo cid = Query ["repos", toPathPart user, toPathPart repo, "pulls", "comments", toPathPart cid] []