Skip to content

Commit

Permalink
Merge pull request #1882 from colinodell/project-ci_forward_deploymen…
Browse files Browse the repository at this point in the history
…t_rollback_allowed

Add support for ci_forward_deployment_rollback_allowed to Projects
  • Loading branch information
svanharmelen committed Feb 16, 2024
2 parents b2e8732 + d2965fa commit 1fdce67
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions projects.go
Expand Up @@ -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"`
Expand Down Expand Up @@ -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"`
Expand Down
4 changes: 4 additions & 0 deletions projects_test.go
Expand Up @@ -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})%"
Expand All @@ -387,6 +389,8 @@ func TestGetProjectByID(t *testing.T) {
},
PackagesEnabled: false,
BuildCoverageRegex: `Total.*([0-9]{1,3})%`,
CIForwardDeploymentEnabled: true,
CIForwardDeploymentRollbackAllowed: true,
CIRestrictPipelineCancellationRole: "developer",
}

Expand Down

0 comments on commit 1fdce67

Please sign in to comment.