MCPcopy Create free account
hub / github.com/pytest-dev/pytest / get_issues

Function get_issues

extra/get_issues.py:9–30  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

mainFunction · 0.85

Calls 2

exitFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected