File tree Expand file tree Collapse file tree 1 file changed +12
-18
lines changed
atlassian/bitbucket/cloud/repositories Expand file tree Collapse file tree 1 file changed +12
-18
lines changed Original file line number Diff line number Diff line change @@ -16,31 +16,25 @@ def __get_object(self, data):
16
16
** self ._new_session_args ,
17
17
)
18
18
19
- def each (self , q = None , sort = None ):
19
+ def each (self ):
20
20
"""
21
21
Returns the list of environments in this repository.
22
22
23
- :param q: string: Query string to narrow down the response.
24
- See https://developer.atlassian.com/bitbucket/api/2/reference/meta/filtering for details.
25
- :param sort: string: Name of a response property to sort results.
26
- See https://developer.atlassian.com/bitbucket/api/2/reference/meta/filtering for details.
27
-
28
- :return: A generator for the DeploymentEnvironment objects
23
+ :return: A list of the DeploymentEnvironment objects
29
24
30
25
API docs: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/environments/#get
31
26
"""
32
- params = {}
33
- if sort is not None :
34
- params ["sort" ] = sort
35
- if q is not None :
36
- params ["q" ] = q
37
- for deployment_environment in self ._get_paged (
38
- None ,
39
- params = params ,
40
- ):
41
- yield self .__get_object (deployment_environment )
42
27
43
- return
28
+ # workaround for this issue
29
+ # https://jira.atlassian.com/browse/BCLOUD-20796
30
+ response = super (BitbucketCloudBase , self ).get (None )
31
+
32
+ deployment_environments = []
33
+
34
+ for value in response .get ("values" , []):
35
+ deployment_environments .append (self .__get_object (value ))
36
+
37
+ return deployment_environments
44
38
45
39
def get (self , uuid ):
46
40
"""
You can’t perform that action at this time.
0 commit comments