Skip to content

Commit 4df6b1e

Browse files
committed
now handles keys with rights to all environments
1 parent 9b4cb32 commit 4df6b1e

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

splitapiclient/microclients/change_request_microclient.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,17 @@ class ChangeRequestMicroClient:
1818
}],
1919
'query_string': [],
2020
'response': True,
21+
},
22+
'list_initial_no_environment': {
23+
'method': 'GET',
24+
'url_template': 'changeRequests?limit=100',
25+
'headers': [{
26+
'name': 'Authorization',
27+
'template': 'Bearer {value}',
28+
'required': True,
29+
}],
30+
'query_string': [],
31+
'response': True,
2132
},
2233
'list_next': {
2334
'method': 'GET',
@@ -70,11 +81,15 @@ def list(self, environment_id):
7081
final_list = []
7182
afterMarker = 0
7283
while True:
73-
if afterMarker==0:
84+
if afterMarker==0 and environment_id!=None:
7485
response = self._http_client.make_request(
7586
self._endpoint['list_initial'],
7687
environmentId = environment_id
7788
)
89+
elif afterMarker==0 and environment_id==None:
90+
response = self._http_client.make_request(
91+
self._endpoint['list_initial_no_environment'],
92+
)
7893
else:
7994
response = self._http_client.make_request(
8095
self._endpoint['list_next'],

0 commit comments

Comments
 (0)