Update and fix variable _create_attrs and _update_attrs#3379
Open
PhilipNelson5 wants to merge 2 commits intopython-gitlab:mainfrom
Open
Update and fix variable _create_attrs and _update_attrs#3379PhilipNelson5 wants to merge 2 commits intopython-gitlab:mainfrom
PhilipNelson5 wants to merge 2 commits intopython-gitlab:mainfrom
Conversation
Author
|
I tried running the suite of functional tests but was unable to. I got the docker containers up but they were so unstable that even adding I was able to run the variable tests against a live gitlab instance to demonstrate to myself the tests failed before my changes and passed after. |
fafebb3 to
b8e89f5
Compare
fix(api): make 'value' an optional variable update attr
b8e89f5 to
f968e2c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
make
valuean optional attribute for variable updatesWhen updating a CI/CD variable that has been marked "Masked and hidden", you likely do not have the value when updating. In this case, the value is
Nonewhich the api rejects (400: {'value': ['is invalid']}).add
masked_and_hiddenthe the list of optional attributes for creating variablesWhen creating variables which you want to be hidden, you have to use the
masked_and_hiddenproperty.I don't think this was causing problems but for the sake completion and documentation I think it makes sense to include.
Documentation and testing
Please consider whether this PR needs documentation and tests. This is not required, but highly appreciated:
Documentation in the matching docs section