Show More
@@ -89,6 +89,11 b' latter case, it is used as a time before the present."""' | |||||
89 | allclosed = get_paged_request(url) |
|
89 | allclosed = get_paged_request(url) | |
90 | # allclosed = get_issues(project=project, state='closed', pulls=pulls, since=period) |
|
90 | # allclosed = get_issues(project=project, state='closed', pulls=pulls, since=period) | |
91 | filtered = [i for i in allclosed if _parse_datetime(i['closed_at']) > period] |
|
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 | return filtered |
|
97 | return filtered | |
93 |
|
98 | |||
94 |
|
99 | |||
@@ -103,7 +108,7 b' def report(issues, show_urls=False):' | |||||
103 | # titles may have unicode in them, so we must encode everything below |
|
108 | # titles may have unicode in them, so we must encode everything below | |
104 | if show_urls: |
|
109 | if show_urls: | |
105 | for i in issues: |
|
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 | print('* :%s:`%d`: %s' % (role, i['number'], |
|
112 | print('* :%s:`%d`: %s' % (role, i['number'], | |
108 | i['title'].encode('utf-8'))) |
|
113 | i['title'].encode('utf-8'))) | |
109 | else: |
|
114 | else: |
General Comments 0
You need to be logged in to leave comments.
Login now