Add DeletePipeline API (#3506)

This is just a first step, the final goal is to have an API endpoint to
prune Repo Pipelines older than the given date.

@woodpecker-ci/maintainers Can I get some feedback if this is the right
direction?

---------

Co-authored-by: 6543 <m.huber@kithara.com>
This commit is contained in:
Robert Kaussow
2024-04-25 10:59:17 +02:00
committed by GitHub
parent 9972c24924
commit d0057736f1
5 changed files with 141 additions and 4 deletions

View File

@@ -94,6 +94,7 @@ func apiRoutes(e *gin.RouterGroup) {
repo.GET("/pipelines", api.GetPipelines)
repo.POST("/pipelines", session.MustPush, api.CreatePipeline)
repo.DELETE("/pipelines/:number", session.MustRepoAdmin(), api.DeletePipeline)
repo.GET("/pipelines/:number", api.GetPipeline)
repo.GET("/pipelines/:number/config", api.GetPipelineConfig)