Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Organizations: allow listing outside collaborators #445

Merged
merged 1 commit into from
May 26, 2020
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
1 change: 1 addition & 0 deletions github.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ library
GitHub.Endpoints.Issues.Milestones
GitHub.Endpoints.Organizations
GitHub.Endpoints.Organizations.Members
GitHub.Endpoints.Organizations.OutsideCollaborators
GitHub.Endpoints.Organizations.Teams
GitHub.Endpoints.PullRequests
GitHub.Endpoints.PullRequests.Comments
Expand Down
6 changes: 6 additions & 0 deletions src/GitHub.hs
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,11 @@ module GitHub (
membersOfWithR,
isMemberOfR,
orgInvitationsR,
-- ** Outside Collaborators
-- | See <https://developer.github.com/v3/orgs/outside_collaborators/>
--
-- Missing endpoints: All except /Outside Collaborator List/
outsideCollaboratorsR,

-- ** Teams
-- | See <https://developer.github.com/v3/orgs/teams/>
Expand Down Expand Up @@ -433,6 +438,7 @@ import GitHub.Endpoints.Issues.Labels
import GitHub.Endpoints.Issues.Milestones
import GitHub.Endpoints.Organizations
import GitHub.Endpoints.Organizations.Members
import GitHub.Endpoints.Organizations.OutsideCollaborators
import GitHub.Endpoints.Organizations.Teams
import GitHub.Endpoints.PullRequests
import GitHub.Endpoints.PullRequests.Comments
Expand Down
21 changes: 21 additions & 0 deletions src/GitHub/Endpoints/Organizations/OutsideCollaborators.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
-----------------------------------------------------------------------------
-- |
-- License : BSD-3-Clause
-- Maintainer : Oleg Grenrus <oleg.grenrus@iki.fi>
--
-- The organization members API as described on
-- <https://developer.github.com/v3/orgs/outside_collaborators/>.
module GitHub.Endpoints.Organizations.OutsideCollaborators (
outsideCollaboratorsR,
) where

import GitHub.Data
import GitHub.Internal.Prelude
import Prelude ()

-- | All the users who are outside collaborators of the specified organization.
--
-- See <https://developer.github.com/v3/orgs/outside_collaborators/#list-outside-collaborators>
outsideCollaboratorsR :: Name Organization -> FetchCount -> Request k (Vector SimpleUser)
outsideCollaboratorsR organization =
pagedQuery ["orgs", toPathPart organization, "outside_collaborators"] []