Skip to content

Instantly share code, notes, and snippets.

@beam2d
Created September 2, 2016 05:48
Show Gist options
  • Save beam2d/376aa97ff9745ffedabb844159818714 to your computer and use it in GitHub Desktop.
Save beam2d/376aa97ff9745ffedabb844159818714 to your computer and use it in GitHub Desktop.
Open PRs of Chainer
1582 2016-09-02 04:29:18 not commented gwtnb not assigned
1580 2016-09-01 00:50:57 2016-09-01 08:04:40 motootom bkvogel
1578 2016-08-31 15:20:16 2016-09-01 02:35:12 unnonouno not assigned
1570 2016-08-30 03:12:58 not commented gwtnb not assigned
1556 2016-08-26 14:23:08 2016-09-01 14:46:38 takagi delta2323
1553 2016-08-24 16:55:14 2016-08-25 08:05:08 unnonouno not assigned
1551 2016-08-24 14:48:08 2016-09-02 05:31:01 okuta not assigned
1543 2016-08-22 13:20:26 2016-08-24 02:26:46 boeddeker not assigned
1541 2016-08-22 08:34:24 2016-08-29 07:17:07 unnonouno delta2323
1537 2016-08-21 15:33:46 2016-08-25 06:28:49 fukatani delta2323
1534 2016-08-20 10:48:07 2016-08-29 06:50:05 takagi delta2323
1527 2016-08-18 15:54:40 2016-08-30 09:25:19 unnonouno not assigned
1521 2016-08-18 07:37:07 2016-08-30 08:02:34 unnonouno beam2d
1517 2016-08-17 05:08:15 not commented takagi not assigned
1516 2016-08-17 04:38:58 2016-08-29 05:35:10 zori t-abe
1515 2016-08-17 04:23:14 2016-08-29 05:14:57 zori t-abe
1506 2016-08-15 08:13:58 not commented delta2323 not assigned
1500 2016-08-14 18:30:24 not commented unnonouno mattya
1485 2016-08-10 07:22:45 2016-09-02 04:46:11 gwtnb okuta
1472 2016-08-08 08:02:19 2016-08-31 13:29:07 iwiwi unnonouno
1469 2016-08-07 16:12:13 not commented okuta not assigned
1465 2016-08-04 16:42:48 not commented unnonouno beam2d
1457 2016-08-02 16:29:09 2016-09-01 06:27:48 tohmae delta2323
1451 2016-08-02 01:55:14 not commented unnonouno rezoo
1443 2016-07-30 17:05:30 not commented unnonouno ir5
1423 2016-07-26 01:06:03 2016-08-28 12:41:15 jekbradbury delta2323
1409 2016-07-21 11:44:05 not commented anaruse not assigned
1408 2016-07-21 07:31:59 2016-09-01 07:44:40 takagi not assigned
1407 2016-07-21 05:58:25 2016-08-26 01:07:21 anaruse okuta
1402 2016-07-19 06:58:49 not commented rezoo not assigned
1395 2016-07-15 16:01:10 not commented delta2323 not assigned
1391 2016-07-14 12:19:47 not commented takagi not assigned
1388 2016-07-14 08:59:42 not commented unnonouno not assigned
1379 2016-07-12 06:51:42 2016-07-25 10:31:41 amitibo zori
1375 2016-07-11 08:14:06 not commented unnonouno not assigned
1356 2016-07-05 00:42:43 2016-07-19 10:12:34 delta2323 unnonouno
1353 2016-07-04 07:24:24 not commented takagi not assigned
1335 2016-06-30 01:22:19 2016-08-29 07:16:26 yasunorikudo mattya
1332 2016-06-28 09:31:15 2016-09-01 06:55:58 unnonouno ir5
1321 2016-06-27 07:10:03 2016-08-20 03:01:42 zori unnonouno
1317 2016-06-26 16:21:41 2016-08-30 10:32:33 fukatani mattya
1309 2016-06-22 21:11:14 2016-06-30 06:18:29 BlGene beam2d
1249 2016-06-03 04:16:50 not commented delta2323 beam2d
1223 2016-05-29 04:51:36 not commented delta2323 not assigned
1174 2016-05-12 07:32:10 2016-08-09 14:05:46 unnonouno okuta
1149 2016-04-26 10:40:49 2016-06-01 00:58:14 fabiencro not assigned
1124 2016-04-15 12:10:05 2016-08-03 23:39:45 prajdabre delta2323
1115 2016-04-12 15:24:26 2016-08-01 05:32:14 unnonouno delta2323
1103 2016-04-10 10:38:52 2016-08-31 15:00:30 unnonouno delta2323
1101 2016-04-08 14:03:57 2016-08-01 05:38:53 unnonouno delta2323
1018 2016-03-12 08:38:04 2016-09-01 22:59:14 hisa0507 delta2323
1004 2016-03-02 05:32:48 2016-06-02 14:24:05 delta2323 beam2d
1003 2016-03-02 05:26:56 2016-07-12 12:34:19 delta2323 beam2d
931 2016-02-09 00:54:39 not commented unnonouno not assigned
274 2015-07-28 11:32:32 not commented unnonouno not assigned
136 2015-07-04 15:13:27 2015-11-04 08:37:26 sinhrks not assigned
from github import Github
ACCESS_TOKEN = 'fill your access token hear'
def get_latest_comment(comments, exc_user, latest=None):
for c in comments.reversed:
if c.user.login == exc_user.login:
continue
if latest and c.updated_at < latest.updated_at:
break
latest = c
return latest
def main():
g = Github(ACCESS_TOKEN)
repo = g.get_repo('pfnet/chainer')
for pull in repo.get_pulls(state='open'):
sender = pull.user
latest_comment = get_latest_comment(pull.get_comments(), sender)
latest_comment = get_latest_comment(pull.get_review_comments(), sender, latest_comment)
latest_comment = get_latest_comment(pull.get_issue_comments(), sender, latest_comment)
record = [str(pull.number),
str(pull.created_at),
str(getattr(latest_comment, 'updated_at', 'not commented')),
sender.login,
getattr(pull.assignee, 'login', 'not assigned')]
print('\t'.join(record))
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment