Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions node_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -962,6 +962,10 @@ def command_line_args() -> Path:
parser_object.add_argument(
"-d", "--log_dir", action="store", help="Specify a custom directory for storing Run IDs and logs.", metavar=""
)

parser_object.add_argument(
"-gh", "--gh_token", action="store", help="Enter GitHub personal access token (https://github.com/settings/tokens)", metavar=""
)
all_arguments = parser_object.parse_args()

username = all_arguments.username
Expand All @@ -972,6 +976,8 @@ def command_line_args() -> Path:
max_run_history = all_arguments.max_run_history
logout = all_arguments.logout
auto_update = all_arguments.auto_update
gh_token = all_arguments.gh_token


# Check if custom log directory exists, if not, we'll try to create it. If
# we can't create the custom log directory, we should error out.
Expand Down Expand Up @@ -1029,6 +1035,8 @@ def command_line_args() -> Path:
CommonUtil.MachineInfo().setLocalUser(node_id)
if max_run_history:
pass
if gh_token:
os.environ["GH_TOKEN"] = gh_token

"""argparse module automatically shows exceptions of corresponding wrong arguments
and executes sys.exit(). So we don't need to use try except"""
Expand Down