Summary
ProjectApi.updateProject(Project) is missing 35 attributes that the GitLab REST API supports for PUT /projects/:id. As a result, these settings cannot be changed through GitLab4J-API even though the GitLab server accepts them.
Reference: GitLab API – Edit/Update a project (also doc/api/projects.md, sections "Update a project" and "Project feature visibility level").
The 19 *_access_level attributes are already fully covered. The gap is in the general project attributes.
Missing parameters
| Parameter |
Type |
Note |
allow_merge_on_skipped_pipeline |
boolean |
|
allow_pipeline_trigger_approve_deployment |
boolean |
Premium/Ultimate |
auto_devops_deploy_strategy |
string |
|
auto_devops_enabled |
boolean |
|
auto_duo_code_review_enabled |
boolean |
Ultimate |
ci_default_git_depth |
integer |
|
ci_display_pipeline_variables |
boolean |
|
ci_forward_deployment_rollback_allowed |
boolean |
|
ci_allow_fork_pipelines_to_run_in_parent_project |
boolean |
|
ci_id_token_sub_claim_components |
array |
|
ci_separated_caches |
boolean |
|
ci_restrict_pipeline_cancellation_role |
string |
Premium/Ultimate |
ci_push_repository_for_job_token_allowed |
boolean |
|
duo_remote_flows_enabled |
boolean |
|
duo_sast_fp_detection_enabled |
boolean |
|
duo_sast_vr_workflow_enabled |
boolean |
|
enforce_auth_checks_on_uploads |
boolean |
|
import_url |
string |
|
keep_latest_artifact |
boolean |
|
max_artifacts_size |
integer |
|
merge_pipelines_enabled |
boolean |
|
mr_default_title_template |
string |
|
merge_trains_enabled |
boolean |
|
merge_trains_skip_train_allowed |
boolean |
|
max_pipelines_per_merge_train |
integer |
|
mirror_overwrites_diverged_branches |
boolean |
Premium/Ultimate |
mirror_user_id |
integer |
Premium/Ultimate, admin only |
mr_default_target_self |
boolean |
|
only_mirror_protected_branches |
boolean |
Premium/Ultimate |
package_registry_access_level |
string |
successor of deprecated packages_enabled |
prevent_merge_without_jira_issue |
boolean |
Ultimate |
protect_merge_request_pipelines |
boolean |
|
service_desk_enabled |
boolean |
|
spp_repository_pipeline_access |
boolean |
Ultimate |
web_based_commit_signing_enabled |
boolean |
GitLab.com only |
Additional notes
- Deprecated and already superseded by attributes that are present, so adding them is not required:
emails_disabled (→ emails_enabled), restrict_user_defined_variables (→ ci_pipeline_variables_minimum_override_role).
avatar is intentionally not part of updateProject — it is covered by the dedicated multipart method setProjectAvatar(...). Not an issue.
- Reverse direction (out of scope here, noted for completeness):
updateProject still sends build_coverage_regex, which no longer exists in the current PUT /projects/:id specification. template_name, use_custom_template, group_with_project_templates_id, and repository_object_format are create-only parameters that have no effect on update.
Proposed fix
Add the missing parameters to ProjectApi.updateProject(Project) and add the corresponding fields/getters/setters to the Project model where they do not yet exist.
Environment
- GitLab4J-API:
6.3.1-SNAPSHOT (main)
- Affected file:
gitlab4j-api/src/main/java/org/gitlab4j/api/ProjectApi.java (updateProject)
Summary
ProjectApi.updateProject(Project)is missing 35 attributes that the GitLab REST API supports forPUT /projects/:id. As a result, these settings cannot be changed through GitLab4J-API even though the GitLab server accepts them.Reference: GitLab API – Edit/Update a project (also
doc/api/projects.md, sections "Update a project" and "Project feature visibility level").The 19
*_access_levelattributes are already fully covered. The gap is in the general project attributes.Missing parameters
allow_merge_on_skipped_pipelineallow_pipeline_trigger_approve_deploymentauto_devops_deploy_strategyauto_devops_enabledauto_duo_code_review_enabledci_default_git_depthci_display_pipeline_variablesci_forward_deployment_rollback_allowedci_allow_fork_pipelines_to_run_in_parent_projectci_id_token_sub_claim_componentsci_separated_cachesci_restrict_pipeline_cancellation_roleci_push_repository_for_job_token_allowedduo_remote_flows_enabledduo_sast_fp_detection_enabledduo_sast_vr_workflow_enabledenforce_auth_checks_on_uploadsimport_urlkeep_latest_artifactmax_artifacts_sizemerge_pipelines_enabledmr_default_title_templatemerge_trains_enabledmerge_trains_skip_train_allowedmax_pipelines_per_merge_trainmirror_overwrites_diverged_branchesmirror_user_idmr_default_target_selfonly_mirror_protected_branchespackage_registry_access_levelpackages_enabledprevent_merge_without_jira_issueprotect_merge_request_pipelinesservice_desk_enabledspp_repository_pipeline_accessweb_based_commit_signing_enabledAdditional notes
emails_disabled(→emails_enabled),restrict_user_defined_variables(→ci_pipeline_variables_minimum_override_role).avataris intentionally not part ofupdateProject— it is covered by the dedicated multipart methodsetProjectAvatar(...). Not an issue.updateProjectstill sendsbuild_coverage_regex, which no longer exists in the currentPUT /projects/:idspecification.template_name,use_custom_template,group_with_project_templates_id, andrepository_object_formatare create-only parameters that have no effect on update.Proposed fix
Add the missing parameters to
ProjectApi.updateProject(Project)and add the corresponding fields/getters/setters to theProjectmodel where they do not yet exist.Environment
6.3.1-SNAPSHOT(main)gitlab4j-api/src/main/java/org/gitlab4j/api/ProjectApi.java(updateProject)