@@ -924,7 +924,7 @@ public Project createProject(String projectName) throws GitLabApiException {
924924 * @throws GitLabApiException if any exception occurs
925925 */
926926 public Project createProject (String name , String path ) throws GitLabApiException {
927-
927+
928928 if ((name == null || name .trim ().isEmpty ()) && (path == null || path .trim ().isEmpty ())) {
929929 throw new RuntimeException ("Either name or path must be specified." );
930930 }
@@ -976,6 +976,7 @@ public Project createProject(Project project) throws GitLabApiException {
976976 * packagesEnabled (optional) - Enable or disable mvn packages repository feature
977977 * buildGitStrategy (optional) - set the build git strategy
978978 * buildCoverageRegex (optional) - set build coverage regex
979+ * squashOption (optional) - set squash option for merge requests
979980 *
980981 * @param project the Project instance with the configuration for the new project
981982 * @param importUrl the URL to import the repository from
@@ -1024,7 +1025,8 @@ public Project createProject(Project project, String importUrl) throws GitLabApi
10241025 .withParam ("build_git_strategy" , project .getBuildGitStrategy ())
10251026 .withParam ("build_coverage_regex" , project .getBuildCoverageRegex ())
10261027 .withParam ("suggestion_commit_message" , project .getSuggestionCommitMessage ())
1027- .withParam ("remove_source_branch_after_merge" , project .getRemoveSourceBranchAfterMerge ());
1028+ .withParam ("remove_source_branch_after_merge" , project .getRemoveSourceBranchAfterMerge ())
1029+ .withParam ("squash_option" , project .getSquashOption ());
10281030
10291031 Namespace namespace = project .getNamespace ();
10301032 if (namespace != null && namespace .getId () != null ) {
@@ -1222,6 +1224,7 @@ public Project createProject(String name, Integer namespaceId, String descriptio
12221224 * packagesEnabled (optional) - Enable or disable mvn packages repository feature
12231225 * buildGitStrategy (optional) - set the build git strategy
12241226 * buildCoverageRegex (optional) - set build coverage regex
1227+ * squashOption (optional) - set squash option for merge requests
12251228 *
12261229 * NOTE: The following parameters specified by the GitLab API edit project are not supported:
12271230 * import_url
@@ -1270,7 +1273,8 @@ public Project updateProject(Project project) throws GitLabApiException {
12701273 .withParam ("build_coverage_regex" , project .getBuildCoverageRegex ())
12711274 .withParam ("merge_method" , project .getMergeMethod ())
12721275 .withParam ("suggestion_commit_message" , project .getSuggestionCommitMessage ())
1273- .withParam ("remove_source_branch_after_merge" , project .getRemoveSourceBranchAfterMerge ());
1276+ .withParam ("remove_source_branch_after_merge" , project .getRemoveSourceBranchAfterMerge ())
1277+ .withParam ("squash_option" , project .getSquashOption ());
12741278
12751279 if (isApiVersion (ApiVersion .V3 )) {
12761280 formData .withParam ("visibility_level" , project .getVisibilityLevel ());
0 commit comments