Skip to content

Commit 267979d

Browse files
committed
Add function to list user's invitations
1 parent 73df3e7 commit 267979d

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/GitHub.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,11 +318,11 @@ module GitHub (
318318

319319
-- * Delete a repository invitation
320320
-- * Update a repository invitation
321-
-- * List a user's repository invitations
322321
-- * Decline a repository invitation
323322

324323
listInvitationsOnR,
325324
acceptInvitationFromR,
325+
listInvitationsForR,
326326

327327

328328
-- * Search

src/GitHub/Endpoints/Repos/Invitations.hs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
-- <https://developer.github.com/v3/repos/invitations/>.
88
module GitHub.Endpoints.Repos.Invitations (
99
listInvitationsOnR,
10+
listInvitationsForR,
1011
acceptInvitationFromR
1112
) where
1213

@@ -20,6 +21,13 @@ listInvitationsOnR :: Name Owner -> Name Repo -> FetchCount -> GenRequest 'MtJSO
2021
listInvitationsOnR user repo =
2122
PagedQuery ["repos", toPathPart user, toPathPart repo, "invitations"] []
2223

24+
-- | List a user's repository invitations
25+
-- See <https://developer.github.com/v3/repos/invitations/#list-a-users-repository-invitations>
26+
listInvitationsForR :: FetchCount -> Request k (Vector RepoInvitation)
27+
listInvitationsForR =
28+
pagedQuery ["user", "repository_invitations"] []
29+
30+
2331
-- | Accept a repository invitation
2432
-- See <https://developer.github.com/v3/repos/invitations/#accept-a-repository-invitation>
2533
acceptInvitationFromR :: Id RepoInvitation -> GenRequest 'MtUnit 'RW ()

0 commit comments

Comments
 (0)