Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
佳 邓
Gitlab4j Api
Commits
251de6b8
Commit
251de6b8
authored
Feb 25, 2019
by
Greg Messner
Browse files
Added deleteMergedBranches() (#312).
parent
34a723b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/RepositoryApi.java
View file @
251de6b8
...
...
@@ -779,4 +779,18 @@ public class RepositoryApi extends AbstractApi {
return
(
GitLabApi
.
createOptionalFromException
(
glae
));
}
}
/**
* <p>Delete all branches that are merged into the project’s default branch.</p?
* NOTE: Protected branches will not be deleted as part of this operation.
*
* <pre><code>GitLab Endpoint: /projects/:id/repository/merged_branches</code></pre>
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @throws GitLabApiException if any exception occurs
*/
public
void
deleteMergedBranches
(
Object
projectIdOrPath
)
throws
GitLabApiException
{
delete
(
Response
.
Status
.
NO_CONTENT
,
null
,
"projects"
,
getProjectIdOrPath
(
projectIdOrPath
),
"repository"
,
"merged_branches"
);
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment