Add 26 Missing GitLab Settings#1987
Add 26 Missing GitLab Settings#1987svanharmelen merged 4 commits intoxanzy:mainfrom Jitsusama:Settings-Parameter-Sync-Batch-2
Conversation
This required adding an additional type as it takes an object with keys of varying types, so I couldn't follow the standard pattern of specifying it as a string map with some standard value type.
svanharmelen
left a comment
There was a problem hiding this comment.
Looks good, but one comment related to the additional struct.
types.go
Outdated
| AllowForcePush bool `json:"allow_force_push,omitempty"` | ||
| AllowedToMerge []int `json:"allowed_to_merge,omitempty"` | ||
| DeveloperCanInitialPush bool `json:"developer_can_initial_push,omitempty"` | ||
| } |
There was a problem hiding this comment.
I prefer to have this struct defined below the Settings struct.
There was a problem hiding this comment.
This should be addressed now. Let me know if you would like it moved somewhere differently, I assumed you meant the bottom of the file, but I just recognized that you might have meant right below. I don't mind moving it to wherever you'd prefer.
settings.go
Outdated
| DefaultArtifactsExpireIn *string `url:"default_artifacts_expire_in,omitempty" json:"default_artifacts_expire_in,omitempty"` | ||
| DefaultBranchName *string `url:"default_branch_name,omitempty" json:"default_branch_name,omitempty"` | ||
| DefaultBranchProtection *int `url:"default_branch_protection,omitempty" json:"default_branch_protection,omitempty"` | ||
| DefaultBranchProtectionDefaults *BranchProtectionDefaults `url:"default_branch_protection_defaults,omitempty" json:"default_branch_protection_defaults,omitempty"` |
There was a problem hiding this comment.
This field should be set to a BranchProtectionDefaultsOptions struct which contains the required fields as pointers (see other option structs).
There was a problem hiding this comment.
This should be addressed now.
|
@svanharmelen; mind taking another look at this, I think I have addressed all of your concerns and would love to cut another MR soon with the last batch of changes. |
|
@Jitsusama while you are at it, do you mind adding |
I'll add it to the next batch that covers the Rs @timofurrer! |
svanharmelen
left a comment
There was a problem hiding this comment.
I updated the ordering (minor tweak), but looks good now 👍🏻 Thanks!
I have discovered ~ 60 settings that have been added to GitLab's API but are currently missing in this project. In this PR I'm taking the next stab at correcting this by adding in 26 missing settings, leaving 27 left.
These settings were found by perusing documentation and code in response to gitlab-org/terraform-provider-gitlab#6332.