module GitHub.Endpoints.Repos.DeployKeys (
deployKeysForR,
deployKeyForR,
createRepoDeployKeyR,
deleteRepoDeployKeyR,
) where
import GitHub.Data
import GitHub.Internal.Prelude
import Prelude ()
deployKeysForR :: Name Owner -> Name Repo -> FetchCount -> Request 'RA (Vector RepoDeployKey)
deployKeysForR user repo =
pagedQuery ["repos", toPathPart user, toPathPart repo, "keys"] []
deployKeyForR :: Name Owner -> Name Repo -> Id RepoDeployKey -> Request 'RA RepoDeployKey
deployKeyForR user repo keyId =
query ["repos", toPathPart user, toPathPart repo, "keys", toPathPart keyId] []
createRepoDeployKeyR :: Name Owner -> Name Repo -> NewRepoDeployKey -> Request 'RW RepoDeployKey
createRepoDeployKeyR user repo key =
command Post ["repos", toPathPart user, toPathPart repo, "keys"] (encode key)
deleteRepoDeployKeyR :: Name Owner -> Name Repo -> Id RepoDeployKey -> GenRequest 'MtUnit 'RW ()
deleteRepoDeployKeyR user repo keyId =
Command Delete ["repos", toPathPart user, toPathPart repo, "keys", toPathPart keyId] mempty