Lines Matching +full:- +full:- +full:user
4 # SPDX-License-Identifier: Apache-2.0
6 """Query the Top-Ten Bug Bashers
8 This script will query the top-ten Bug Bashers in a specified date window.
11 ./scripts/bug-bash.py -t ~/.ghtoken -b 2021-07-26 -e 2021-08-07
12 GITHUB_TOKEN="..." ./scripts/bug-bash.py -b 2021-07-26 -e 2021-08-07
26 parser.add_argument('-a', '--all', dest='all',
28 parser.add_argument('-t', '--token', dest='tokenfile',
30 parser.add_argument('-s', '--start', dest='start', help='start date (YYYY-mm-dd)',
32 parser.add_argument('-e', '--end', dest='end', help='end date (YYYY-mm-dd)',
60 self._repo = gh.get_repo('zephyrproject-rtos/zephyr')
68 """Return a dict with (key = user, value = score)"""
71 user = p.user.login
72 tally[user] = tally.get(user, 0) + 1
77 """Return a dict with (key = score, value = list<user>) sorted in
81 for user, score in self.get_tally().items():
83 rev_tally[score] = [user]
85 rev_tally[score].append(user)
94 """Return a dict with (key = score, value = user) sorted in
98 # do not sort users by login - hopefully fair-ish
99 for user in users:
103 top_ten.append(tuple([score, user]))
129 # or 'end date' :-/
138 prid = int(ipr.html_url.split('/')[-1])
152 """custom argparse *date* type for user dates values given from the
155 return datetime.strptime(arg_date_str, "%Y-%m-%d")
157 msg = "Given Date ({0}) not valid! Expected format, YYYY-MM-DD!".format(arg_date_str)
162 """Print the top-ten bug bashers"""
163 for score, user in top_ten:
164 # print tab-separated value, to allow for ./script ... > foo.csv
165 print('{}\t{}'.format(score, user))
180 issues[i].number, pulls[i].user.login, pulls[i].title))