From d2965fa4760e6e1b562582146cfec265e2f7a846 Mon Sep 17 00:00:00 2001 From: Colin O'Dell Date: Wed, 14 Feb 2024 06:52:17 -0500 Subject: [PATCH] Add support for ci_forward_deployment_rollback_allowed to Projects --- projects.go | 2 ++ projects_test.go | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/projects.go b/projects.go index 3ec346d1f..e34bd3729 100644 --- a/projects.go +++ b/projects.go @@ -135,6 +135,7 @@ type Project struct { ImportError string `json:"import_error"` CIDefaultGitDepth int `json:"ci_default_git_depth"` CIForwardDeploymentEnabled bool `json:"ci_forward_deployment_enabled"` + CIForwardDeploymentRollbackAllowed bool `json:"ci_forward_deployment_rollback_allowed"` CISeperateCache bool `json:"ci_separated_caches"` CIJobTokenScopeEnabled bool `json:"ci_job_token_scope_enabled"` CIOptInJWT bool `json:"ci_opt_in_jwt"` @@ -842,6 +843,7 @@ type EditProjectOptions struct { CIConfigPath *string `url:"ci_config_path,omitempty" json:"ci_config_path,omitempty"` CIDefaultGitDepth *int `url:"ci_default_git_depth,omitempty" json:"ci_default_git_depth,omitempty"` CIForwardDeploymentEnabled *bool `url:"ci_forward_deployment_enabled,omitempty" json:"ci_forward_deployment_enabled,omitempty"` + CIForwardDeploymentRollbackAllowed *bool `url:"ci_forward_deployment_rollback_allowed,omitempty" json:"ci_forward_deployment_rollback_allowed,omitempty"` CISeperateCache *bool `url:"ci_separated_caches,omitempty" json:"ci_separated_caches,omitempty"` CIRestrictPipelineCancellationRole *AccessControlValue `url:"ci_restrict_pipeline_cancellation_role,omitempty" json:"ci_restrict_pipeline_cancellation_role,omitempty"` ContainerExpirationPolicyAttributes *ContainerExpirationPolicyAttributes `url:"container_expiration_policy_attributes,omitempty" json:"container_expiration_policy_attributes,omitempty"` diff --git a/projects_test.go b/projects_test.go index c9cb81917..4a5e4d565 100644 --- a/projects_test.go +++ b/projects_test.go @@ -371,6 +371,8 @@ func TestGetProjectByID(t *testing.T) { "name_regex_keep": null, "next_run_at": "2020-01-07T21:42:58.658Z" }, + "ci_forward_deployment_enabled": true, + "ci_forward_deployment_rollback_allowed": true, "ci_restrict_pipeline_cancellation_role": "developer", "packages_enabled": false, "build_coverage_regex": "Total.*([0-9]{1,3})%" @@ -387,6 +389,8 @@ func TestGetProjectByID(t *testing.T) { }, PackagesEnabled: false, BuildCoverageRegex: `Total.*([0-9]{1,3})%`, + CIForwardDeploymentEnabled: true, + CIForwardDeploymentRollbackAllowed: true, CIRestrictPipelineCancellationRole: "developer", }