module GitHub.Endpoints.Repos.Collaborators (
collaboratorsOnR,
collaboratorPermissionOnR,
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"] []
collaboratorPermissionOnR
:: Name Owner
-> Name Repo
-> Name User
-> GenRequest 'MtJSON rw CollaboratorWithPermission
collaboratorPermissionOnR owner repo coll =
query ["repos", toPathPart owner, toPathPart repo, "collaborators", toPathPart coll, "permission"] []
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