module GitHub.Endpoints.Actions.Secrets (
organizationSecretsR,
organizationPublicKeyR,
organizationSecretR,
setOrganizationSecretR,
deleteOrganizationSecretR,
organizationSelectedRepositoriesForSecretR,
setOrganizationSelectedRepositoriesForSecretR,
addOrganizationSelectedRepositoriesForSecretR,
removeOrganizationSelectedRepositoriesForSecretR,
repoSecretsR,
repoPublicKeyR,
repoSecretR,
setRepoSecretR,
deleteRepoSecretR,
environmentSecretsR,
environmentPublicKeyR,
environmentSecretR,
setEnvironmentSecretR,
deleteEnvironmentSecretR,
module GitHub.Data
) where
import GitHub.Data
import GitHub.Internal.Prelude
import Prelude ()
organizationSecretsR
:: Name Organization
-> FetchCount
-> GenRequest 'MtJSON 'RA (WithTotalCount OrganizationSecret)
organizationSecretsR :: Name Organization
-> FetchCount
-> GenRequest 'MtJSON 'RA (WithTotalCount OrganizationSecret)
organizationSecretsR Name Organization
org =
Paths
-> QueryString
-> FetchCount
-> GenRequest 'MtJSON 'RA (WithTotalCount OrganizationSecret)
forall a (t :: * -> *) b (mt :: MediaType (*)) (rw :: RW).
(a ~ t b, Foldable t, Semigroup a) =>
Paths -> QueryString -> FetchCount -> GenRequest mt rw a
PagedQuery [Text
"orgs", Name Organization -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name Organization
org, Text
"actions", Text
"secrets"] []
organizationPublicKeyR
:: Name Organization
-> GenRequest 'MtJSON 'RA PublicKey
organizationPublicKeyR :: Name Organization -> GenRequest 'MtJSON 'RA PublicKey
organizationPublicKeyR Name Organization
org =
Paths -> QueryString -> GenRequest 'MtJSON 'RA PublicKey
forall (mt :: MediaType (*)) (rw :: RW) a.
Paths -> QueryString -> GenRequest mt rw a
Query [Text
"orgs", Name Organization -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name Organization
org, Text
"actions", Text
"secrets", Text
"public-key"] []
organizationSecretR
:: Name Organization
-> Name OrganizationSecret
-> GenRequest 'MtJSON 'RA OrganizationSecret
organizationSecretR :: Name Organization
-> Name OrganizationSecret
-> GenRequest 'MtJSON 'RA OrganizationSecret
organizationSecretR Name Organization
org Name OrganizationSecret
name =
Paths -> QueryString -> GenRequest 'MtJSON 'RA OrganizationSecret
forall (mt :: MediaType (*)) (rw :: RW) a.
Paths -> QueryString -> GenRequest mt rw a
Query [Text
"orgs", Name Organization -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name Organization
org, Text
"actions", Text
"secrets", Name OrganizationSecret -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name OrganizationSecret
name] []
setOrganizationSecretR
:: Name Organization
-> Name OrganizationSecret
-> SetSecret
-> GenRequest 'MtUnit 'RW ()
setOrganizationSecretR :: Name Organization
-> Name OrganizationSecret
-> SetSecret
-> GenRequest 'MtUnit 'RW ()
setOrganizationSecretR Name Organization
org Name OrganizationSecret
name =
CommandMethod -> Paths -> ByteString -> GenRequest 'MtUnit 'RW ()
forall (mt :: MediaType (*)) a.
CommandMethod -> Paths -> ByteString -> GenRequest mt 'RW a
Command CommandMethod
Put [Text
"orgs", Name Organization -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name Organization
org, Text
"actions", Text
"secrets", Name OrganizationSecret -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name OrganizationSecret
name] (ByteString -> GenRequest 'MtUnit 'RW ())
-> (SetSecret -> ByteString)
-> SetSecret
-> GenRequest 'MtUnit 'RW ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SetSecret -> ByteString
forall a. ToJSON a => a -> ByteString
encode
deleteOrganizationSecretR
:: Name Organization
-> Name OrganizationSecret
-> GenRequest 'MtUnit 'RW ()
deleteOrganizationSecretR :: Name Organization
-> Name OrganizationSecret -> GenRequest 'MtUnit 'RW ()
deleteOrganizationSecretR Name Organization
org Name OrganizationSecret
name =
CommandMethod -> Paths -> ByteString -> GenRequest 'MtUnit 'RW ()
forall (mt :: MediaType (*)) a.
CommandMethod -> Paths -> ByteString -> GenRequest mt 'RW a
Command CommandMethod
Delete Paths
parts ByteString
forall a. Monoid a => a
mempty
where
parts :: Paths
parts = [Text
"orgs", Name Organization -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name Organization
org, Text
"actions", Text
"secrets", Name OrganizationSecret -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name OrganizationSecret
name]
organizationSelectedRepositoriesForSecretR
:: Name Organization
-> Name OrganizationSecret
-> FetchCount
-> GenRequest 'MtJSON 'RA (WithTotalCount SelectedRepo)
organizationSelectedRepositoriesForSecretR :: Name Organization
-> Name OrganizationSecret
-> FetchCount
-> GenRequest 'MtJSON 'RA (WithTotalCount SelectedRepo)
organizationSelectedRepositoriesForSecretR Name Organization
org Name OrganizationSecret
name =
Paths
-> QueryString
-> FetchCount
-> GenRequest 'MtJSON 'RA (WithTotalCount SelectedRepo)
forall a (t :: * -> *) b (mt :: MediaType (*)) (rw :: RW).
(a ~ t b, Foldable t, Semigroup a) =>
Paths -> QueryString -> FetchCount -> GenRequest mt rw a
PagedQuery [Text
"orgs", Name Organization -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name Organization
org, Text
"actions", Text
"secrets", Name OrganizationSecret -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name OrganizationSecret
name, Text
"repositories"] []
setOrganizationSelectedRepositoriesForSecretR
:: Name Organization
-> Name OrganizationSecret
-> SetSelectedRepositories
-> GenRequest 'MtUnit 'RW ()
setOrganizationSelectedRepositoriesForSecretR :: Name Organization
-> Name OrganizationSecret
-> SetSelectedRepositories
-> GenRequest 'MtUnit 'RW ()
setOrganizationSelectedRepositoriesForSecretR Name Organization
org Name OrganizationSecret
name =
CommandMethod -> Paths -> ByteString -> GenRequest 'MtUnit 'RW ()
forall (mt :: MediaType (*)) a.
CommandMethod -> Paths -> ByteString -> GenRequest mt 'RW a
Command CommandMethod
Put [Text
"orgs", Name Organization -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name Organization
org, Text
"actions", Text
"secrets", Name OrganizationSecret -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name OrganizationSecret
name, Text
"repositories"] (ByteString -> GenRequest 'MtUnit 'RW ())
-> (SetSelectedRepositories -> ByteString)
-> SetSelectedRepositories
-> GenRequest 'MtUnit 'RW ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SetSelectedRepositories -> ByteString
forall a. ToJSON a => a -> ByteString
encode
addOrganizationSelectedRepositoriesForSecretR
:: Name Organization
-> Name OrganizationSecret
-> Id Repo
-> GenRequest 'MtUnit 'RW ()
addOrganizationSelectedRepositoriesForSecretR :: Name Organization
-> Name OrganizationSecret -> Id Repo -> GenRequest 'MtUnit 'RW ()
addOrganizationSelectedRepositoriesForSecretR Name Organization
org Name OrganizationSecret
name Id Repo
repo =
CommandMethod -> Paths -> ByteString -> GenRequest 'MtUnit 'RW ()
forall (mt :: MediaType (*)) a.
CommandMethod -> Paths -> ByteString -> GenRequest mt 'RW a
Command CommandMethod
Put [Text
"orgs", Name Organization -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name Organization
org, Text
"actions", Text
"secrets", Name OrganizationSecret -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name OrganizationSecret
name, Text
"repositories", Id Repo -> Text
forall a. IsPathPart a => a -> Text
toPathPart Id Repo
repo] ByteString
forall a. Monoid a => a
mempty
removeOrganizationSelectedRepositoriesForSecretR
:: Name Organization
-> Name OrganizationSecret
-> Id Repo
-> GenRequest 'MtUnit 'RW ()
removeOrganizationSelectedRepositoriesForSecretR :: Name Organization
-> Name OrganizationSecret -> Id Repo -> GenRequest 'MtUnit 'RW ()
removeOrganizationSelectedRepositoriesForSecretR Name Organization
org Name OrganizationSecret
name Id Repo
repo =
CommandMethod -> Paths -> ByteString -> GenRequest 'MtUnit 'RW ()
forall (mt :: MediaType (*)) a.
CommandMethod -> Paths -> ByteString -> GenRequest mt 'RW a
Command CommandMethod
Delete [Text
"orgs", Name Organization -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name Organization
org, Text
"actions", Text
"secrets", Name OrganizationSecret -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name OrganizationSecret
name, Text
"repositories", Id Repo -> Text
forall a. IsPathPart a => a -> Text
toPathPart Id Repo
repo] ByteString
forall a. Monoid a => a
mempty
repoSecretsR
:: Name Owner
-> Name Repo
-> FetchCount
-> GenRequest 'MtJSON 'RA (WithTotalCount RepoSecret)
repoSecretsR :: Name Owner
-> Name Repo
-> FetchCount
-> GenRequest 'MtJSON 'RA (WithTotalCount RepoSecret)
repoSecretsR Name Owner
user Name Repo
repo =
Paths
-> QueryString
-> FetchCount
-> GenRequest 'MtJSON 'RA (WithTotalCount RepoSecret)
forall a (t :: * -> *) b (mt :: MediaType (*)) (rw :: RW).
(a ~ t b, Foldable t, Semigroup a) =>
Paths -> QueryString -> FetchCount -> GenRequest mt rw a
PagedQuery [Text
"repos", Name Owner -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name Owner
user, Name Repo -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name Repo
repo, Text
"actions", Text
"secrets"] []
repoPublicKeyR
:: Name Owner
-> Name Organization
-> GenRequest 'MtJSON 'RA PublicKey
repoPublicKeyR :: Name Owner -> Name Organization -> GenRequest 'MtJSON 'RA PublicKey
repoPublicKeyR Name Owner
user Name Organization
org =
Paths -> QueryString -> GenRequest 'MtJSON 'RA PublicKey
forall (mt :: MediaType (*)) (rw :: RW) a.
Paths -> QueryString -> GenRequest mt rw a
Query [Text
"repos", Name Owner -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name Owner
user, Name Organization -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name Organization
org, Text
"actions", Text
"secrets", Text
"public-key"] []
repoSecretR
:: Name Owner
-> Name Organization
-> Name RepoSecret
-> GenRequest 'MtJSON 'RA RepoSecret
repoSecretR :: Name Owner
-> Name Organization
-> Name RepoSecret
-> GenRequest 'MtJSON 'RA RepoSecret
repoSecretR Name Owner
user Name Organization
org Name RepoSecret
name =
Paths -> QueryString -> GenRequest 'MtJSON 'RA RepoSecret
forall (mt :: MediaType (*)) (rw :: RW) a.
Paths -> QueryString -> GenRequest mt rw a
Query [Text
"repos", Name Owner -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name Owner
user, Name Organization -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name Organization
org, Text
"actions", Text
"secrets", Name RepoSecret -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name RepoSecret
name] []
setRepoSecretR
:: Name Owner
-> Name Organization
-> Name RepoSecret
-> SetRepoSecret
-> GenRequest 'MtUnit 'RW ()
setRepoSecretR :: Name Owner
-> Name Organization
-> Name RepoSecret
-> SetRepoSecret
-> GenRequest 'MtUnit 'RW ()
setRepoSecretR Name Owner
user Name Organization
org Name RepoSecret
name =
CommandMethod -> Paths -> ByteString -> GenRequest 'MtUnit 'RW ()
forall (mt :: MediaType (*)) a.
CommandMethod -> Paths -> ByteString -> GenRequest mt 'RW a
Command CommandMethod
Put [Text
"repos", Name Owner -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name Owner
user, Name Organization -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name Organization
org, Text
"actions", Text
"secrets", Name RepoSecret -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name RepoSecret
name] (ByteString -> GenRequest 'MtUnit 'RW ())
-> (SetRepoSecret -> ByteString)
-> SetRepoSecret
-> GenRequest 'MtUnit 'RW ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SetRepoSecret -> ByteString
forall a. ToJSON a => a -> ByteString
encode
deleteRepoSecretR
:: Name Owner
-> Name Organization
-> Name RepoSecret
-> GenRequest 'MtUnit 'RW ()
deleteRepoSecretR :: Name Owner
-> Name Organization
-> Name RepoSecret
-> GenRequest 'MtUnit 'RW ()
deleteRepoSecretR Name Owner
user Name Organization
org Name RepoSecret
name =
CommandMethod -> Paths -> ByteString -> GenRequest 'MtUnit 'RW ()
forall (mt :: MediaType (*)) a.
CommandMethod -> Paths -> ByteString -> GenRequest mt 'RW a
Command CommandMethod
Delete Paths
parts ByteString
forall a. Monoid a => a
mempty
where
parts :: Paths
parts = [Text
"repos", Name Owner -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name Owner
user, Name Organization -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name Organization
org, Text
"actions", Text
"secrets", Name RepoSecret -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name RepoSecret
name]
environmentSecretsR
:: Id Repo
-> Name Environment
-> FetchCount
-> GenRequest 'MtJSON 'RA (WithTotalCount RepoSecret)
environmentSecretsR :: Id Repo
-> Name Environment
-> FetchCount
-> GenRequest 'MtJSON 'RA (WithTotalCount RepoSecret)
environmentSecretsR Id Repo
repo Name Environment
env =
Paths
-> QueryString
-> FetchCount
-> GenRequest 'MtJSON 'RA (WithTotalCount RepoSecret)
forall a (t :: * -> *) b (mt :: MediaType (*)) (rw :: RW).
(a ~ t b, Foldable t, Semigroup a) =>
Paths -> QueryString -> FetchCount -> GenRequest mt rw a
PagedQuery [Text
"repositories", Id Repo -> Text
forall a. IsPathPart a => a -> Text
toPathPart Id Repo
repo, Text
"environments", Name Environment -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name Environment
env, Text
"secrets"] []
environmentPublicKeyR
:: Id Repo
-> Name Environment
-> GenRequest 'MtJSON 'RA PublicKey
environmentPublicKeyR :: Id Repo -> Name Environment -> GenRequest 'MtJSON 'RA PublicKey
environmentPublicKeyR Id Repo
repo Name Environment
env =
Paths -> QueryString -> GenRequest 'MtJSON 'RA PublicKey
forall (mt :: MediaType (*)) (rw :: RW) a.
Paths -> QueryString -> GenRequest mt rw a
Query [Text
"repositories", Id Repo -> Text
forall a. IsPathPart a => a -> Text
toPathPart Id Repo
repo, Text
"environments", Name Environment -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name Environment
env, Text
"secrets", Text
"public-key"] []
environmentSecretR
:: Id Repo
-> Name Environment
-> Name RepoSecret
-> GenRequest 'MtJSON 'RA RepoSecret
environmentSecretR :: Id Repo
-> Name Environment
-> Name RepoSecret
-> GenRequest 'MtJSON 'RA RepoSecret
environmentSecretR Id Repo
repo Name Environment
env Name RepoSecret
name =
Paths -> QueryString -> GenRequest 'MtJSON 'RA RepoSecret
forall (mt :: MediaType (*)) (rw :: RW) a.
Paths -> QueryString -> GenRequest mt rw a
Query [Text
"repositories", Id Repo -> Text
forall a. IsPathPart a => a -> Text
toPathPart Id Repo
repo, Text
"environments", Name Environment -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name Environment
env, Text
"secrets", Name RepoSecret -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name RepoSecret
name] []
setEnvironmentSecretR
:: Id Repo
-> Name Environment
-> Name RepoSecret
-> SetRepoSecret
-> GenRequest 'MtUnit 'RW ()
setEnvironmentSecretR :: Id Repo
-> Name Environment
-> Name RepoSecret
-> SetRepoSecret
-> GenRequest 'MtUnit 'RW ()
setEnvironmentSecretR Id Repo
repo Name Environment
env Name RepoSecret
name =
CommandMethod -> Paths -> ByteString -> GenRequest 'MtUnit 'RW ()
forall (mt :: MediaType (*)) a.
CommandMethod -> Paths -> ByteString -> GenRequest mt 'RW a
Command CommandMethod
Put [Text
"repositories", Id Repo -> Text
forall a. IsPathPart a => a -> Text
toPathPart Id Repo
repo, Text
"environments", Name Environment -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name Environment
env, Text
"secrets", Name RepoSecret -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name RepoSecret
name] (ByteString -> GenRequest 'MtUnit 'RW ())
-> (SetRepoSecret -> ByteString)
-> SetRepoSecret
-> GenRequest 'MtUnit 'RW ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SetRepoSecret -> ByteString
forall a. ToJSON a => a -> ByteString
encode
deleteEnvironmentSecretR
:: Id Repo
-> Name Environment
-> Name RepoSecret
-> GenRequest 'MtUnit 'RW ()
deleteEnvironmentSecretR :: Id Repo
-> Name Environment -> Name RepoSecret -> GenRequest 'MtUnit 'RW ()
deleteEnvironmentSecretR Id Repo
repo Name Environment
env Name RepoSecret
name =
CommandMethod -> Paths -> ByteString -> GenRequest 'MtUnit 'RW ()
forall (mt :: MediaType (*)) a.
CommandMethod -> Paths -> ByteString -> GenRequest mt 'RW a
Command CommandMethod
Delete Paths
parts ByteString
forall a. Monoid a => a
mempty
where
parts :: Paths
parts = [Text
"repositories", Id Repo -> Text
forall a. IsPathPart a => a -> Text
toPathPart Id Repo
repo, Text
"environments", Name Environment -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name Environment
env, Text
"secrets", Name RepoSecret -> Text
forall a. IsPathPart a => a -> Text
toPathPart Name RepoSecret
name]