(token, revision_range)
| 107 | |
| 108 | |
| 109 | def main(token, revision_range): |
| 110 | lst_release, cur_release = [r.strip() for r in revision_range.split('..')] |
| 111 | |
| 112 | github = Github(token) |
| 113 | github_repo = github.get_repo('numpy/numpy') |
| 114 | |
| 115 | # document authors |
| 116 | authors = get_authors(revision_range) |
| 117 | heading = "Contributors" |
| 118 | print() |
| 119 | print(heading) |
| 120 | print("="*len(heading)) |
| 121 | print(author_msg % len(authors)) |
| 122 | |
| 123 | for s in authors: |
| 124 | print('* ' + s) |
| 125 | |
| 126 | # document pull requests |
| 127 | pull_requests = get_pull_requests(github_repo, revision_range) |
| 128 | heading = "Pull requests merged" |
| 129 | pull_msg = "* `#{0} <{1}>`__: {2}" |
| 130 | |
| 131 | print() |
| 132 | print(heading) |
| 133 | print("="*len(heading)) |
| 134 | print(pull_request_msg % len(pull_requests)) |
| 135 | |
| 136 | for pull in pull_requests: |
| 137 | title = re.sub(r"\s+", " ", pull.title.strip()) |
| 138 | if len(title) > 60: |
| 139 | remainder = re.sub(r"\s.*$", "...", title[60:]) |
| 140 | if len(remainder) > 20: |
| 141 | remainder = title[:80] + "..." |
| 142 | else: |
| 143 | title = title[:60] + remainder |
| 144 | print(pull_msg.format(pull.number, pull.html_url, title)) |
| 145 | |
| 146 | |
| 147 | if __name__ == "__main__": |
no test coverage detected