Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ce8ece7

Browse files
authored
Merge pull request haskell-github#429 from vrom911/vrom911/428-edit-issue-number
Use IssueNumber in editIssueR and issueR
2 parents 1ac8ddf + 3cb9b23 commit ce8ece7

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

spec/GitHub/IssuesSpec.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ spec = do
3838
cms <- GitHub.executeRequest auth $
3939
GitHub.commentsR owner repo (GitHub.issueNumber i) 1
4040
cms `shouldSatisfy` isRight
41+
describe "issueR" $ do
42+
it "fetches issue #428" $ withAuth $ \auth -> do
43+
resIss <- GitHub.executeRequest auth $
44+
GitHub.issueR "phadej" "github" (GitHub.IssueNumber 428)
45+
resIss `shouldSatisfy` isRight
4146
where
4247
repos =
4348
[ ("thoughtbot", "paperclip")

src/GitHub/Endpoints/Issues.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ organizationIssuesR org opts =
3333

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

@@ -63,6 +63,6 @@ editOfIssue = EditIssue Nothing Nothing Nothing Nothing Nothing Nothing
6363

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

0 commit comments

Comments
 (0)