MCPcopy
hub / github.com/pytest-dev/pytest / get_issues

Function get_issues

extra/get_issues.py:13–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11
12
13def get_issues():
14 issues = []
15 url = issues_url
16 while 1:
17 get_data = {"state": "all"}
18 r = requests.get(url, params=get_data)
19 data = r.json()
20 if r.status_code == 403:
21 # API request limit exceeded
22 print(data["message"])
23 sys.exit(1)
24 issues.extend(data)
25
26 # Look for next page
27 links = requests.utils.parse_header_links(r.headers["Link"])
28 another_page = False
29 for link in links:
30 if link["rel"] == "next":
31 url = link["url"]
32 another_page = True
33 if not another_page:
34 return issues
35
36
37def main(args):

Callers 1

mainFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…