File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -568,6 +568,21 @@ def set_variables(self, obj):
568568 self .client ._perform_empty (
569569 "PUT" , "/projects/%s/variables/" % self .project_key , body = obj )
570570
571+
572+ def update_variables (self , variables , type = "standard" ):
573+ """
574+ Updates a set of variables for this project
575+
576+ :param variables dict: a dict of variable name -> value to set. Keys of the dict must be strings.
577+ Values in the dict can be strings, numbers, booleans, lists or dicts
578+ :param type str: Can be "standard" to update regular variables or "local" to update local-only
579+ variables that are not part of bundles for this project
580+ """
581+
582+ current_variables = self .get_variables ()
583+ current_variables [type ].update (variables )
584+ self .set_variables (current_variables )
585+
571586 ########################################################
572587 # API Services
573588 ########################################################
You can’t perform that action at this time.
0 commit comments