module GitHub.Endpoints.GitData.References (
referenceR,
referencesR,
createReferenceR,
namespacedReferencesR,
module GitHub.Data,
) where
import GitHub.Data
import GitHub.Internal.Prelude
import Prelude ()
referenceR :: Name Owner -> Name Repo -> Name GitReference -> Request k GitReference
referenceR user repo ref =
query ["repos", toPathPart user, toPathPart repo, "git", "refs", toPathPart ref] []
referencesR :: Name Owner -> Name Repo -> FetchCount -> Request k (Vector GitReference)
referencesR user repo =
pagedQuery ["repos", toPathPart user, toPathPart repo, "git", "refs"] []
createReferenceR :: Name Owner -> Name Repo -> NewGitReference -> Request 'RW GitReference
createReferenceR user repo newRef =
command Post ["repos", toPathPart user, toPathPart repo , "git", "refs"] (encode newRef)
namespacedReferencesR :: Name Owner -> Name Repo -> Text -> Request k [GitReference]
namespacedReferencesR user repo namespace =
query ["repos", toPathPart user, toPathPart repo, "git", "refs", namespace] []