Skip to content

Commit 502d03c

Browse files
authored
Merge pull request #694 from filipowm/master
Add support for ci_config_path and ci_forward_deployment_enabled properties to Projects API
2 parents 47ef2d9 + 9290e57 commit 502d03c

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

src/main/java/org/gitlab4j/api/ProjectApi.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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+
* ciConfigPath (optional) - Set path to CI configuration file
979980
* squashOption (optional) - set squash option for merge requests
980981
*
981982
* @param project the Project instance with the configuration for the new project
@@ -1024,6 +1025,7 @@ public Project createProject(Project project, String importUrl) throws GitLabApi
10241025
.withParam("packages_enabled", project.getPackagesEnabled())
10251026
.withParam("build_git_strategy", project.getBuildGitStrategy())
10261027
.withParam("build_coverage_regex", project.getBuildCoverageRegex())
1028+
.withParam("ci_config_path", project.getCiConfigPath());
10271029
.withParam("suggestion_commit_message", project.getSuggestionCommitMessage())
10281030
.withParam("remove_source_branch_after_merge", project.getRemoveSourceBranchAfterMerge())
10291031
.withParam("squash_option", project.getSquashOption());
@@ -1224,13 +1226,14 @@ public Project createProject(String name, Integer namespaceId, String descriptio
12241226
* packagesEnabled (optional) - Enable or disable mvn packages repository feature
12251227
* buildGitStrategy (optional) - set the build git strategy
12261228
* buildCoverageRegex (optional) - set build coverage regex
1229+
* ciConfigPath (optional) - Set path to CI configuration file
1230+
* ciForwardDeploymentEnabled (optional) - When a new deployment job starts, skip older deployment jobs that are still pending
12271231
* squashOption (optional) - set squash option for merge requests
12281232
*
12291233
* NOTE: The following parameters specified by the GitLab API edit project are not supported:
12301234
* import_url
12311235
* tag_list array
12321236
* avatar
1233-
* ci_config_path
12341237
* initialize_with_readme
12351238
*
12361239
* @param project the Project instance with the configuration for the new project
@@ -1271,6 +1274,8 @@ public Project updateProject(Project project) throws GitLabApiException {
12711274
.withParam("packages_enabled", project.getPackagesEnabled())
12721275
.withParam("build_git_strategy", project.getBuildGitStrategy())
12731276
.withParam("build_coverage_regex", project.getBuildCoverageRegex())
1277+
.withParam("ci_config_path", project.getCiConfigPath())
1278+
.withParam("ci_forward_deployment_enabled", project.getCiForwardDeploymentEnabled());
12741279
.withParam("merge_method", project.getMergeMethod())
12751280
.withParam("suggestion_commit_message", project.getSuggestionCommitMessage())
12761281
.withParam("remove_source_branch_after_merge", project.getRemoveSourceBranchAfterMerge())

src/main/java/org/gitlab4j/api/models/Project.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ public String toString() {
100100
private Boolean canCreateMergeRequestIn;
101101
private Status importStatus;
102102
private Integer ciDefaultGitDepth;
103+
private Boolean ciForwardDeploymentEnabled;
104+
private String ciConfigPath;
103105
private Boolean removeSourceBranchAfterMerge;
104106
private Boolean autoDevopsEnabled;
105107
private AutoDevopsDeployStrategy autoDevopsDeployStrategy;
@@ -782,6 +784,22 @@ public void setCiDefaultGitDepth(Integer ciDefaultGitDepth) {
782784
this.ciDefaultGitDepth = ciDefaultGitDepth;
783785
}
784786

787+
public Boolean getCiForwardDeploymentEnabled() {
788+
return ciForwardDeploymentEnabled;
789+
}
790+
791+
public void setCiForwardDeploymentEnabled(Boolean ciForwardDeploymentEnabled) {
792+
this.ciForwardDeploymentEnabled = ciForwardDeploymentEnabled;
793+
}
794+
795+
public String getCiConfigPath() {
796+
return ciConfigPath;
797+
}
798+
799+
public void setCiConfigPath(String ciConfigPath) {
800+
this.ciConfigPath = ciConfigPath;
801+
}
802+
785803
public Boolean getRemoveSourceBranchAfterMerge() {
786804
return removeSourceBranchAfterMerge;
787805
}

0 commit comments

Comments
 (0)