module GitHub.Endpoints.Repos.Collaborators (
collaboratorsOnR,
isCollaboratorOnR,
addCollaboratorR,
module GitHub.Data,
) where
import GitHub.Data
import GitHub.Internal.Prelude
import Prelude ()
collaboratorsOnR :: Name Owner -> Name Repo -> FetchCount -> Request k (Vector SimpleUser)
collaboratorsOnR user repo =
pagedQuery ["repos", toPathPart user, toPathPart repo, "collaborators"] []
isCollaboratorOnR
:: Name Owner
-> Name Repo
-> Name User
-> GenRequest 'MtStatus rw Bool
isCollaboratorOnR user repo coll =
Query ["repos", toPathPart user, toPathPart repo, "collaborators", toPathPart coll] []
addCollaboratorR
:: Name Owner
-> Name Repo
-> Name User
-> GenRequest 'MtJSON 'RW (Maybe RepoInvitation)
addCollaboratorR owner repo coll =
Command Put ["repos", toPathPart owner, toPathPart repo, "collaborators", toPathPart coll] mempty