diff --git a/openapproved.py b/openapproved.py index 57b09f4..862c8ff 100755 --- a/openapproved.py +++ b/openapproved.py @@ -22,6 +22,7 @@ Prints out list of approved patches that failed to merge and are currently still open. Only show patches that are likely to be trivial rebases. """ +import getpass import optparse import sys @@ -37,7 +38,7 @@ def main(argv=None): help='JSON file describing the project to generate stats for') optparser.add_option('-a', '--all', action='store_true', help='Generate stats across all known projects (*.json)') - optparser.add_option('-u', '--user', default='russellb', help='gerrit user') + optparser.add_option('-u', '--user', default=getpass.getuser(), help='gerrit user') optparser.add_option('-k', '--key', default=None, help='ssh key for gerrit') optparser.add_option('-s', '--stable', action='store_true', help='Include stable branch commits') diff --git a/openreviews.py b/openreviews.py index 67083cf..9f3f510 100755 --- a/openreviews.py +++ b/openreviews.py @@ -18,6 +18,7 @@ import calendar import datetime +import getpass import optparse import os import os.path @@ -234,7 +235,7 @@ def main(argv=None): help='JSON file describing the project to generate stats for') optparser.add_option('-a', '--all', action='store_true', help='Generate stats across all known projects (*.json)') - optparser.add_option('-u', '--user', default='russellb', help='gerrit user') + optparser.add_option('-u', '--user', default=getpass.getuser(), help='gerrit user') optparser.add_option('-k', '--key', default=None, help='ssh key for gerrit') optparser.add_option('-s', '--stable', action='store_true', help='Include stable branch commits') diff --git a/reviewers.py b/reviewers.py index fe0b382..f9ce727 100755 --- a/reviewers.py +++ b/reviewers.py @@ -19,6 +19,7 @@ import calendar import datetime +import getpass import glob import json import optparse @@ -38,7 +39,7 @@ optparser.add_option('-a', '--all', action='store_true', help='Generate stats across all known projects (*.json)') optparser.add_option('-d', '--days', type='int', default=14, help='Number of days to consider') -optparser.add_option('-u', '--user', default='russellb', help='gerrit user') +optparser.add_option('-u', '--user', default=getpass.getuser(), help='gerrit user') optparser.add_option('-k', '--key', default=None, help='ssh key for gerrit') options, args = optparser.parse_args()