Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: projects emails_disabled to emails_enabled #1768

Merged
merged 2 commits into from Aug 4, 2023

Conversation

PascalRoose
Copy link
Contributor

@PascalRoose PascalRoose commented Aug 1, 2023

In the GitLab Projects API the emails_disabled parameter has been deprecated in favour of emails_enabled.

See: https://docs.gitlab.com/ee/api/projects.html#create-project

Attribute Type Required Description
emails_disabled boolean No (Deprecated) Disable email notifications. Use emails_enabled instead
emails_enabled boolean No Enable email notifications.

@PascalRoose
Copy link
Contributor Author

PR is also needed to update the terraform provider: https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/issues/6069

Copy link
Member

@svanharmelen svanharmelen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small request, rest looks fine 👍🏻

projects.go Outdated
ExternalAuthorizationClassificationLabel string `json:"external_authorization_classification_label"`
RequirementsEnabled bool `json:"requirements_enabled"`
RequirementsAccessLevel AccessControlValue `json:"requirements_access_level"`
SecurityAndComplianceEnabled bool `json:"security_and_compliance_enabled"`
SecurityAndComplianceAccessLevel AccessControlValue `json:"security_and_compliance_access_level"`
MergeRequestDefaultTargetSelf bool `json:"mr_default_target_self"`

// Deprecated: Use EmailsEnabled instead
EmailsDisabled bool `url:"emails_disabled,omitempty" json:"emails_disabled,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
EmailsDisabled bool `url:"emails_disabled,omitempty" json:"emails_disabled,omitempty"`
EmailsDisabled bool `json:"emails_disabled"`

Copy link
Member

@svanharmelen svanharmelen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed it for you... Thanks 👍🏻

@svanharmelen svanharmelen merged commit 3b7542a into xanzy:master Aug 4, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants