module Github.Issues.Comments (
comment
,comments
,comments'
,createComment
,editComment
,module Github.Data
) where
import Github.Data
import Github.Private
comment :: String -> String -> Int -> IO (Either Error IssueComment)
comment user reqRepoName reqCommentId =
githubGet ["repos", user, reqRepoName, "issues", "comments", show reqCommentId]
comments :: String -> String -> Int -> IO (Either Error [IssueComment])
comments user reqRepoName reqIssueNumber =
githubGet ["repos", user, reqRepoName, "issues", show reqIssueNumber, "comments"]
comments' :: Maybe GithubAuth -> String -> String -> Int -> IO (Either Error [IssueComment])
comments' auth user reqRepoName reqIssueNumber =
githubGet' auth ["repos", user, reqRepoName, "issues", show reqIssueNumber, "comments"]
createComment :: GithubAuth -> String -> String -> Int -> String
-> IO (Either Error Comment)
createComment auth user repo iss body =
githubPost auth
["repos", user, repo, "issues", show iss, "comments"] (NewComment body)
editComment :: GithubAuth -> String -> String -> Int -> String
-> IO (Either Error Comment)
editComment auth user repo commid body =
githubPatch auth ["repos", user, repo, "issues", "comments", show commid]
(EditComment body)