Skip to content

Commit f541150

Browse files
committed
Added personal access token for github and fixed issue with input arguments
1 parent e7a4abc commit f541150

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/gitfetch/cli.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ def _create_fetcher(provider: str, base_url: str, token: Optional[str] = None):
534534
def _initialize_gitfetch(config_manager: ConfigManager) -> bool:
535535
"""
536536
Initialize gitfetch by creating config directory and setting
537-
the authenticated user as default.
537+
multiple configuration options.
538538
539539
Args:
540540
config_manager: ConfigManager instance
@@ -566,9 +566,10 @@ def _initialize_gitfetch(config_manager: ConfigManager) -> bool:
566566

567567
# Ask for token if needed
568568
token = None
569-
if provider in ['gitlab', 'gitea', 'sourcehut']:
569+
if provider in ['gitlab', 'gitea', 'sourcehut', 'github']:
570570
token_input = input(
571-
f"Enter your {provider} personal access token "
571+
f"Enter your {provider} personal access token{', needed for private repositories' if provider == 'github' else ''}\n"
572+
+
572573
"(optional, press Enter to skip): "
573574
).strip()
574575
if token_input:

0 commit comments

Comments
 (0)