module GitHub.Endpoints.PullRequests.Comments (
pullRequestCommentsR,
pullRequestCommentR,
createPullCommentR,
module GitHub.Data,
) where
import GitHub.Data
import GitHub.Internal.Prelude
import Prelude ()
pullRequestCommentsR :: Name Owner -> Name Repo -> IssueNumber -> FetchCount -> Request k (Vector Comment)
pullRequestCommentsR user repo prid =
pagedQuery ["repos", toPathPart user, toPathPart repo, "pulls", toPathPart prid, "comments"] []
pullRequestCommentR :: Name Owner -> Name Repo -> Id Comment -> Request k Comment
pullRequestCommentR user repo cid =
query ["repos", toPathPart user, toPathPart repo, "pulls", "comments", toPathPart cid] []
createPullCommentR :: Name Owner -> Name Repo -> IssueNumber -> Text -> Text -> Int -> Text -> Request 'RW Comment
createPullCommentR user repo iss commit path position body =
command Post parts (encode $ NewPullComment commit path position body)
where
parts = ["repos", toPathPart user, toPathPart repo, "pulls", toPathPart iss, "comments"]