Skip to content

Commit

Permalink
Edit args
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanRosenboim committed Aug 19, 2024
1 parent bc696b2 commit abc836f
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/scripts/sync_teams/sync_teams.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,16 @@ def parse_input_file() -> Tuple[Organization, bool, bool]:
parser = argparse.ArgumentParser(description="Retrieve teams and assets")
parser.add_argument("file", help="Path to a JSON file")

# Use 'store' to allow setting the flag to True or False
parser.add_argument("--skip-no-resources", type=bool, nargs='?', const=True, default=True,
help="Set to False to not skip teams with no active resources (default: True)")
parser.add_argument("--verify-github-membership", type=bool, nargs='?', const=True, default=True,
help="Set to False to not verify GitHub membership (default: True)")
# Default behavior is True, override with --no-skip-no-resources and --no-verify-github-membership
parser.add_argument("--skip-no-resources", dest='skip_no_resources', action="store_true",
help="Skip teams with no active resources", default=True)
parser.add_argument("--no-skip-no-resources", dest='skip_no_resources', action="store_false",
help="Do not skip teams with no active resources")

parser.add_argument("--verify-github-membership", dest='verify_github_membership', action="store_true",
help="Verify GitHub membership when setting team members", default=True)
parser.add_argument("--no-verify-github-membership", dest='verify_github_membership', action="store_false",
help="Do not verify GitHub membership when setting team members")

args = parser.parse_args()

Expand Down

0 comments on commit abc836f

Please sign in to comment.