diff options
author | Toon Claes <toon@iotcl.com> | 2016-09-21 16:15:12 +0200 |
---|---|---|
committer | Toon Claes <toon@iotcl.com> | 2016-11-09 21:04:03 +0100 |
commit | 1afab9eb79c87f32c7b899e58bc9a0ea8a113594 (patch) | |
tree | 33068aabffdb6b76c0489246429a3a71c2b748a4 /doc/api/branches.md | |
parent | c392b0cc24ba40e3fed920c6c693cb24665193af (diff) | |
download | gitlab-ce-1afab9eb79c87f32c7b899e58bc9a0ea8a113594.tar.gz |
Add button to delete all merged branches
It adds a button to the branches page that the user can use to delete
all the branches that are already merged. This can be used to clean up
all the branches that were forgotten to delete while merging MRs.
Fixes #21076.
Diffstat (limited to 'doc/api/branches.md')
-rw-r--r-- | doc/api/branches.md | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/doc/api/branches.md b/doc/api/branches.md index 0b5f7778fc7..f68eeb9f86b 100644 --- a/doc/api/branches.md +++ b/doc/api/branches.md @@ -240,3 +240,21 @@ Example response: "branch_name": "newbranch" } ``` + +## Delete merged branches + +Will delete all branches that are merged into the project's default branch. + +``` +DELETE /projects/:id/repository/merged_branches +``` + +| Attribute | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `id` | integer | yes | The ID of a project | + +It returns `200` to indicate deletion of all merged branches was started. + +```bash +curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/repository/merged_branches" +``` |