##// END OF EJS Templates
exclude non-merged pulls from gh stats
MinRK -
Show More
@@ -89,6 +89,11 b' latter case, it is used as a time before the present."""'
89 89 allclosed = get_paged_request(url)
90 90 # allclosed = get_issues(project=project, state='closed', pulls=pulls, since=period)
91 91 filtered = [i for i in allclosed if _parse_datetime(i['closed_at']) > period]
92
93 # exclude rejected PRs
94 if pulls:
95 filtered = [ pr for pr in filtered if pr['merged_at'] ]
96
92 97 return filtered
93 98
94 99
@@ -103,7 +108,7 b' def report(issues, show_urls=False):'
103 108 # titles may have unicode in them, so we must encode everything below
104 109 if show_urls:
105 110 for i in issues:
106 role = 'ghpull' if 'merged' in i else 'ghissue'
111 role = 'ghpull' if 'merged_at' in i else 'ghissue'
107 112 print('* :%s:`%d`: %s' % (role, i['number'],
108 113 i['title'].encode('utf-8')))
109 114 else:
General Comments 0
You need to be logged in to leave comments. Login now