Skip to content

Commit 8590fd0

Browse files
authored
Merge pull request haskell-github#445 from cachix/org-outside-collaborators
Organizations: allow listing outside collaborators
2 parents d27b8d2 + 3a3f3b8 commit 8590fd0

3 files changed

Lines changed: 28 additions & 0 deletions

File tree

github.cabal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ library
132132
GitHub.Endpoints.Issues.Milestones
133133
GitHub.Endpoints.Organizations
134134
GitHub.Endpoints.Organizations.Members
135+
GitHub.Endpoints.Organizations.OutsideCollaborators
135136
GitHub.Endpoints.Organizations.Teams
136137
GitHub.Endpoints.PullRequests
137138
GitHub.Endpoints.PullRequests.Comments

src/GitHub.hs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,11 @@ module GitHub (
175175
membersOfWithR,
176176
isMemberOfR,
177177
orgInvitationsR,
178+
-- ** Outside Collaborators
179+
-- | See <https://developer.github.com/v3/orgs/outside_collaborators/>
180+
--
181+
-- Missing endpoints: All except /Outside Collaborator List/
182+
outsideCollaboratorsR,
178183

179184
-- ** Teams
180185
-- | See <https://developer.github.com/v3/orgs/teams/>
@@ -433,6 +438,7 @@ import GitHub.Endpoints.Issues.Labels
433438
import GitHub.Endpoints.Issues.Milestones
434439
import GitHub.Endpoints.Organizations
435440
import GitHub.Endpoints.Organizations.Members
441+
import GitHub.Endpoints.Organizations.OutsideCollaborators
436442
import GitHub.Endpoints.Organizations.Teams
437443
import GitHub.Endpoints.PullRequests
438444
import GitHub.Endpoints.PullRequests.Comments
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
-----------------------------------------------------------------------------
2+
-- |
3+
-- License : BSD-3-Clause
4+
-- Maintainer : Oleg Grenrus <[email protected]>
5+
--
6+
-- The organization members API as described on
7+
-- <https://developer.github.com/v3/orgs/outside_collaborators/>.
8+
module GitHub.Endpoints.Organizations.OutsideCollaborators (
9+
outsideCollaboratorsR,
10+
) where
11+
12+
import GitHub.Data
13+
import GitHub.Internal.Prelude
14+
import Prelude ()
15+
16+
-- | All the users who are outside collaborators of the specified organization.
17+
--
18+
-- See <https://developer.github.com/v3/orgs/outside_collaborators/#list-outside-collaborators>
19+
outsideCollaboratorsR :: Name Organization -> FetchCount -> Request k (Vector SimpleUser)
20+
outsideCollaboratorsR organization =
21+
pagedQuery ["orgs", toPathPart organization, "outside_collaborators"] []

0 commit comments

Comments
 (0)