module GitHub.Endpoints.Repos.DeployKeys (
deployKeysFor',
deployKeysForR,
deployKeyFor',
deployKeyForR,
createRepoDeployKey',
createRepoDeployKeyR,
deleteRepoDeployKey',
deleteRepoDeployKeyR,
) where
import GitHub.Data
import GitHub.Internal.Prelude
import GitHub.Request
import Prelude ()
deployKeysFor' :: Auth -> Name Owner -> Name Repo -> IO (Either Error (Vector RepoDeployKey))
deployKeysFor' auth user repo =
executeRequest auth $ deployKeysForR user repo FetchAll
deployKeysForR :: Name Owner -> Name Repo -> FetchCount -> Request 'RA (Vector RepoDeployKey)
deployKeysForR user repo =
pagedQuery ["repos", toPathPart user, toPathPart repo, "keys"] []
deployKeyFor' :: Auth -> Name Owner -> Name Repo -> Id RepoDeployKey -> IO (Either Error RepoDeployKey)
deployKeyFor' auth user repo keyId =
executeRequest auth $ deployKeyForR user repo keyId
deployKeyForR :: Name Owner -> Name Repo -> Id RepoDeployKey -> Request 'RA RepoDeployKey
deployKeyForR user repo keyId =
query ["repos", toPathPart user, toPathPart repo, "keys", toPathPart keyId] []
createRepoDeployKey' :: Auth -> Name Owner -> Name Repo -> NewRepoDeployKey -> IO (Either Error RepoDeployKey)
createRepoDeployKey' auth user repo key =
executeRequest auth $ createRepoDeployKeyR user repo key
createRepoDeployKeyR :: Name Owner -> Name Repo -> NewRepoDeployKey -> Request 'RW RepoDeployKey
createRepoDeployKeyR user repo key =
command Post ["repos", toPathPart user, toPathPart repo, "keys"] (encode key)
deleteRepoDeployKey' :: Auth -> Name Owner -> Name Repo -> Id RepoDeployKey -> IO (Either Error ())
deleteRepoDeployKey' auth user repo keyId =
executeRequest auth $ deleteRepoDeployKeyR user repo keyId
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