-
Notifications
You must be signed in to change notification settings - Fork 961
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
Add hidden field to ProjectVariable struct #2065
base: main
Are you sure you want to change the base?
Add hidden field to ProjectVariable struct #2065
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yogeshlonkar thanks for the contribution 🤝 I've left some clarification questions on the correctness of the field / field naming. Back to you 🏓
@@ -132,6 +133,7 @@ type CreateProjectVariableOptions struct { | |||
Description *string `url:"description,omitempty" json:"description,omitempty"` | |||
EnvironmentScope *string `url:"environment_scope,omitempty" json:"environment_scope,omitempty"` | |||
Masked *bool `url:"masked,omitempty" json:"masked,omitempty"` | |||
Hidden *bool `url:"hidden,omitempty" json:"hidden,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the docs it looks like it's called masked_and_hidden
. Did hidden
work for you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API in docs perspective masked_and_hidden
is consistent name. I have not tested this against the api.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There also might be validation error as masked and masked_and_hidden should be mutually exclusive as per UI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, we need to support in go-gitlab exactly with what the upstream API supports.
I have not tested this against the api.
I highly recommend doing this :)
@@ -173,6 +175,7 @@ type UpdateProjectVariableOptions struct { | |||
EnvironmentScope *string `url:"environment_scope,omitempty" json:"environment_scope,omitempty"` | |||
Filter *VariableFilter `url:"filter,omitempty" json:"filter,omitempty"` | |||
Masked *bool `url:"masked,omitempty" json:"masked,omitempty"` | |||
Hidden *bool `url:"hidden,omitempty" json:"hidden,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the docs I don't see that this field is supported in the update API. Did hidden
work for you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feature is not matured, You can close the MR or leave it open until this field is available in update api.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's up to you. We can already merge what is supported and iterate. No need to wait for a "matured" upstream API.
IMHO, we should move on with what is supported upstream.
No description provided.