Skip to content

Commit 91764d4

Browse files
committed
Add support for ci_config_path and ci_forward_deployment_enabled properties to Projects API
1 parent db8f925 commit 91764d4

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

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

Lines changed: 8 additions & 2 deletions
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
*
980981
* @param project the Project instance with the configuration for the new project
981982
* @param importUrl the URL to import the repository from
@@ -1022,7 +1023,8 @@ public Project createProject(Project project, String importUrl) throws GitLabApi
10221023
.withParam("initialize_with_readme", project.getInitializeWithReadme())
10231024
.withParam("packages_enabled", project.getPackagesEnabled())
10241025
.withParam("build_git_strategy", project.getBuildGitStrategy())
1025-
.withParam("build_coverage_regex", project.getBuildCoverageRegex());
1026+
.withParam("build_coverage_regex", project.getBuildCoverageRegex())
1027+
.withParam("ci_config_path", project.getCiConfigPath());
10261028

10271029
Namespace namespace = project.getNamespace();
10281030
if (namespace != null && namespace.getId() != null) {
@@ -1220,6 +1222,8 @@ public Project createProject(String name, Integer namespaceId, String descriptio
12201222
* packagesEnabled (optional) - Enable or disable mvn packages repository feature
12211223
* buildGitStrategy (optional) - set the build git strategy
12221224
* buildCoverageRegex (optional) - set build coverage regex
1225+
* ciConfigPath (optional) - Set path to CI configuration file
1226+
* ciForwardDeploymentEnabled (optional) - When a new deployment job starts, skip older deployment jobs that are still pending
12231227
*
12241228
* NOTE: The following parameters specified by the GitLab API edit project are not supported:
12251229
* import_url
@@ -1265,7 +1269,9 @@ public Project updateProject(Project project) throws GitLabApiException {
12651269
.withParam("resolve_outdated_diff_discussions", project.getResolveOutdatedDiffDiscussions())
12661270
.withParam("packages_enabled", project.getPackagesEnabled())
12671271
.withParam("build_git_strategy", project.getBuildGitStrategy())
1268-
.withParam("build_coverage_regex", project.getBuildCoverageRegex());
1272+
.withParam("build_coverage_regex", project.getBuildCoverageRegex())
1273+
.withParam("ci_config_path", project.getCiConfigPath())
1274+
.withParam("ci_forward_deployment_enabled", project.getCiForwardDeploymentEnabled());
12691275

12701276
if (isApiVersion(ApiVersion.V3)) {
12711277
formData.withParam("visibility_level", project.getVisibilityLevel());

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ public String toString() {
9999
private Boolean canCreateMergeRequestIn;
100100
private Status importStatus;
101101
private Integer ciDefaultGitDepth;
102+
private Boolean ciForwardDeploymentEnabled;
103+
private String ciConfigPath;
102104
private Boolean removeSourceBranchAfterMerge;
103105
private Boolean autoDevopsEnabled;
104106
private AutoDevopsDeployStrategy autoDevopsDeployStrategy;
@@ -779,6 +781,22 @@ public void setCiDefaultGitDepth(Integer ciDefaultGitDepth) {
779781
this.ciDefaultGitDepth = ciDefaultGitDepth;
780782
}
781783

784+
public Boolean getCiForwardDeploymentEnabled() {
785+
return ciForwardDeploymentEnabled;
786+
}
787+
788+
public void setCiForwardDeploymentEnabled(Boolean ciForwardDeploymentEnabled) {
789+
this.ciForwardDeploymentEnabled = ciForwardDeploymentEnabled;
790+
}
791+
792+
public String getCiConfigPath() {
793+
return ciConfigPath;
794+
}
795+
796+
public void setCiConfigPath(String ciConfigPath) {
797+
this.ciConfigPath = ciConfigPath;
798+
}
799+
782800
public Boolean getRemoveSourceBranchAfterMerge() {
783801
return removeSourceBranchAfterMerge;
784802
}

0 commit comments

Comments
 (0)