Skip to content

Commit 8c64a08

Browse files
committed
Slightly improve query cursor insertion.
1 parent e00ffca commit 8c64a08

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

issues.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ def send_query(query, cursor=None):
5353
# TODO: Unhack this
5454
# WARNING: This hack relies on specific structure of issues query
5555
if cursor is not None:
56-
cursor_ind = query.find('OPEN') + len('OPEN')
57-
query = query[:cursor_ind] + ' after:"{}"'.format(cursor) + query[cursor_ind:]
56+
cursor_ind = query.find("issues(") + len("issues(")
57+
query = query[:cursor_ind] + f'after:"{cursor}", ' + query[cursor_ind:]
5858
# Build request payload
5959
payload = {'query' : ''.join(query.split('\n'))}
6060
response = requests.post(endpoint, json=payload, headers=headers)

0 commit comments

Comments
 (0)