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):
1616 ** self ._new_session_args ,
1717 )
1818
19- def each (self , q = None , sort = None ):
19+ def each (self ):
2020 """
2121 Returns the list of environments in this repository.
2222
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
2924
3025 API docs: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/environments/#get
3126 """
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 )
4227
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
4438
4539 def get (self , uuid ):
4640 """
You can’t perform that action at this time.
0 commit comments