You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: atlassian/bitbucket/cloud/repositories/repositoryVariables.py
+53-2Lines changed: 53 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,25 @@ def __get_object(self, data):
14
14
**self._new_session_args,
15
15
)
16
16
17
+
defcreate(self, key, value, secured):
18
+
"""
19
+
Create a new repository variable for the given repository.
20
+
21
+
:param key: string: The unique name of the variable.
22
+
:param value: string: The value of the variable. If the variable is secured, this will be empty.
23
+
:param secured: boolean: If true, this variable will be treated as secured. The value will never be exposed in the logs or the REST API.
24
+
25
+
:return: The created RepositoryVariable object
26
+
27
+
API docs: https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pipelines/#api-repositories-workspace-repo-slug-pipelines-config-variables-post
:return: A generator for the RepositoryVariable objects
27
46
28
-
API docs: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/pipelines_config/variables/#get
47
+
API docs: https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pipelines/#api-repositories-workspace-repo-slug-pipelines-config-variables-get
29
48
"""
30
49
params= {}
31
50
ifsortisnotNone:
@@ -50,7 +69,7 @@ def get(self, uuid):
50
69
51
70
:return: The requested RepositoryVariable objects
52
71
53
-
API docs: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/pipelines_config/variables/%7Bvariable_uuid%7D#get
72
+
API docs: https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pipelines/#api-repositories-workspace-repo-slug-pipelines-config-variables-variable-uuid-get
Update the repository variable properties. Fields not present in the request body are ignored.
84
+
85
+
:param kwargs: dict: The data to update.
86
+
87
+
:return: The updated repository variable
88
+
89
+
API docs: https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pipelines/#api-repositories-workspace-repo-slug-pipelines-config-variables-variable-uuid-put
API docs: https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pipelines/#api-repositories-workspace-repo-slug-pipelines-config-variables-variable-uuid-delete
0 commit comments