{-# LANGUAGE OverloadedStrings #-}
module GitLab.API.JobArtifacts
(
deleteProjectArtifacts,
)
where
import qualified Data.ByteString.Lazy as BSL
import Data.Text (Text)
import qualified Data.Text as T
import GitLab.Types
import GitLab.WebRequests.GitLabWebCalls
import Network.HTTP.Client
deleteProjectArtifacts ::
Project ->
GitLab (Either (Response BSL.ByteString) (Maybe ()))
deleteProjectArtifacts :: Project -> GitLab (Either (Response ByteString) (Maybe ()))
deleteProjectArtifacts Project
prj = do
Text
-> [GitLabParam]
-> GitLab (Either (Response ByteString) (Maybe ()))
forall a.
FromJSON a =>
Text
-> [GitLabParam] -> GitLab (Either (Response ByteString) (Maybe a))
gitlabDelete Text
projAddr []
where
projAddr :: Text
projAddr :: Text
projAddr =
Text
"/projects/"
Text -> Text -> Text
forall a. Semigroup a => a -> a -> a
<> String -> Text
T.pack (Int -> String
forall a. Show a => a -> String
show (Project -> Int
project_id Project
prj))
Text -> Text -> Text
forall a. Semigroup a => a -> a -> a
<> Text
"/artifacts"