Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions spec/GitHub/IssuesSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ spec = do
cms <- GitHub.executeRequest auth $
GitHub.commentsR owner repo (GitHub.issueNumber i) 1
cms `shouldSatisfy` isRight
describe "issueR" $ do
it "fetches issue #428" $ withAuth $ \auth -> do
resIss <- GitHub.executeRequest auth $
GitHub.issueR "phadej" "github" (GitHub.IssueNumber 428)
resIss `shouldSatisfy` isRight
where
repos =
[ ("thoughtbot", "paperclip")
Expand Down
4 changes: 2 additions & 2 deletions src/GitHub/Endpoints/Issues.hs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ organizationIssuesR org opts =

-- | Query a single issue.
-- See <https://developer.github.com/v3/issues/#get-a-single-issue>
issueR :: Name Owner -> Name Repo -> Id Issue -> Request k Issue
issueR :: Name Owner -> Name Repo -> IssueNumber -> Request k Issue
issueR user reqRepoName reqIssueNumber =
query ["repos", toPathPart user, toPathPart reqRepoName, "issues", toPathPart reqIssueNumber] []

Expand Down Expand Up @@ -63,6 +63,6 @@ editOfIssue = EditIssue Nothing Nothing Nothing Nothing Nothing Nothing

-- | Edit an issue.
-- See <https://developer.github.com/v3/issues/#edit-an-issue>
editIssueR :: Name Owner -> Name Repo -> Id Issue -> EditIssue -> Request 'RW Issue
editIssueR :: Name Owner -> Name Repo -> IssueNumber -> EditIssue -> Request 'RW Issue
editIssueR user repo iss =
command Patch ["repos", toPathPart user, toPathPart repo, "issues", toPathPart iss] . encode