Commit ac1cd584 authored by Shawn Stafford's avatar Shawn Stafford

Adding a default branch argument to the updateProject method.

The default branch controls which branch is displayed when a
user navigates to a project in Gitlab.  Typically Gitlab will
default to the first branch that is pushed to the repository.
In cases where automation is used to create other branches
prior to creating the master or development branches, it may
be necessary to use this "default_branch" field to specify
the default branch that should be displayed to users.
parent 7ad6dd87
......@@ -750,6 +750,7 @@ public class GitlabAPI {
* @param projectId The id of the project to update
* @param name The name of the project
* @param description A description for the project, null otherwise
* @param defaultBranch The branch displayed in the Gitlab UI when a user navigates to the project
* @param issuesEnabled Whether Issues should be enabled, otherwise null indicates to use GitLab default
* @param wallEnabled Whether The Wall should be enabled, otherwise null indicates to use GitLab default
* @param mergeRequestsEnabled Whether Merge Requests should be enabled, otherwise null indicates to use GitLab default
......@@ -760,10 +761,24 @@ public class GitlabAPI {
* @return the Gitlab Project
* @throws IOException on gitlab api call error
*/
public GitlabProject updateProject(Integer projectId, String name, String description, Boolean issuesEnabled, Boolean wallEnabled, Boolean mergeRequestsEnabled, Boolean wikiEnabled, Boolean snippetsEnabled, Boolean publik, Integer visibilityLevel) throws IOException {
public GitlabProject updateProject(
Integer projectId,
String name,
String description,
String defaultBranch,
Boolean issuesEnabled,
Boolean wallEnabled,
Boolean mergeRequestsEnabled,
Boolean wikiEnabled,
Boolean snippetsEnabled,
Boolean publik,
Integer visibilityLevel)
throws IOException
{
Query query = new Query()
.appendIf("name", name)
.appendIf("description", description)
.appendIf("default_branch", defaultBranch)
.appendIf("issues_enabled", issuesEnabled)
.appendIf("wall_enabled", wallEnabled)
.appendIf("merge_requests_enabled", mergeRequestsEnabled)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment