-
-
Save adampalay/7fb189284f3d215369b264f004de11c6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import argparse | |
def main(): | |
parser = argparse.ArgumentParser( | |
description='randomly choose whom to tag for PR review' | |
) | |
parser.add_argument( | |
'number_people_to_tag', | |
type=int, | |
nargs="?", | |
default=2, | |
help='number of people to tag' | |
) | |
parser.add_argument( | |
'--include_adam', | |
action='store_true', | |
help='use flag if you want to add adam to the mix of people to tag' | |
) | |
args = parser.parse_args() | |
team_members = [ | |
"@ayub-khan", | |
"@awaisdar001", | |
"@attiyaishaque", | |
"@Rabia23", | |
"@asadazam93", | |
"@uzairr", | |
"@noraiz-anwar", | |
] | |
if args.include_adam: | |
team_members.append('@adampalay') | |
number_people_to_tag = min(args.number_people_to_tag, len(team_members)) | |
people_to_tag = random.sample(team_members, number_people_to_tag) | |
for person_to_tag in people_to_tag: | |
print("- [ ] " + person_to_tag) | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment