feat: list branch protections

This commit is contained in:
orion 2023-11-28 10:36:21 -06:00
parent 4dbc94624a
commit 0bab60e1fb
Signed by: orion
GPG Key ID: 6D4165AE4C928719

View File

@ -28,6 +28,13 @@ get u r b = do
rep <- HTTP.fetch $ HTTP.GET /\ url /\ Auth.headers auth
Error.tryGetRepJSON rep
list :: forall m. MonadAff m => Username -> RepoName -> GiteaT m (Record BranchProtection)
list u r = do
{ auth } <- ask
url <- branchProtectionURL u r
rep <- HTTP.fetch $ HTTP.GET /\ url /\ Auth.headers auth
Error.tryGetRepJSON rep
update
:: forall m patch
. MonadAff m