mirror of https://github.com/apache/druid.git
Fix bugs in milestone contributor script (#7545)
* Only check PRs in milestone contributor script * Fix no-pagination bug
This commit is contained in:
parent
3e25b75c3f
commit
658fb2b062
|
@ -36,6 +36,8 @@ contributors = set()
|
|||
# Get all users who created a closed issue or merged PR for a given milestone
|
||||
while not done:
|
||||
resp = requests.get("https://api.github.com/repos/apache/incubator-druid/issues?milestone=%s&state=closed&page=%s" % (milestone_num, page_counter))
|
||||
|
||||
if "Link" in resp.headers:
|
||||
pagination_link = resp.headers["Link"]
|
||||
|
||||
# last page doesn't have a "next"
|
||||
|
@ -43,9 +45,13 @@ while not done:
|
|||
done = True
|
||||
else:
|
||||
page_counter += 1
|
||||
else:
|
||||
# Not enough issues to require pagination
|
||||
done = True
|
||||
|
||||
issues = json.loads(resp.text)
|
||||
for issue in issues:
|
||||
if "pull_request" in issue:
|
||||
contributor_name = issue["user"]["login"]
|
||||
contributors.add(contributor_name)
|
||||
|
||||
|
|
Loading…
Reference in New Issue