From 36a92ee249c2980eb561ad06d4f0f4a999c3859a Mon Sep 17 00:00:00 2001 From: Vivek Anand Date: Mar 02 2017 12:03:48 +0000 Subject: [PATCH 1/2] github: don't ask for password in the command itself Signed-off-by: Vivek Anand --- diff --git a/pagure_importer/commands/github.py b/pagure_importer/commands/github.py index 070f130..9060d03 100644 --- a/pagure_importer/commands/github.py +++ b/pagure_importer/commands/github.py @@ -14,14 +14,14 @@ from pagure_importer.utils.exceptions import ( @app.command() @click.option('--username', prompt='Enter your Github Username', help="Github username") -@click.option('--password', prompt=True, hide_input=True, - help="Github password") @click.option('--project', prompt='Enter github project name like pypingou/pagure', help="Github project like pypingou/pagure") @click.option('--nopush', is_flag=True, help="Do not push the result of pagure-importer back") -def github(username, password, project, nopush): +def github(username, project, nopush): + ''' Command to import from github ''' + password = click.prompt("Github Password", hide_input=True) gen_json = click.confirm( "Do you want to generate jsons for project's contributers" " and issue commentors?") From 6ff62d718c2085cc19f7bbd712f650f0b0e902a5 Mon Sep 17 00:00:00 2001 From: Vivek Anand Date: Mar 02 2017 12:03:48 +0000 Subject: [PATCH 2/2] fedorahosted: don't ask for password in command Signed-off-by: Vivek Anand --- diff --git a/pagure_importer/commands/fedorahosted.py b/pagure_importer/commands/fedorahosted.py index 5e22a64..9e9a6b9 100644 --- a/pagure_importer/commands/fedorahosted.py +++ b/pagure_importer/commands/fedorahosted.py @@ -14,14 +14,15 @@ import pagure_importer.utils.git as gitutils is_flag=True) @click.option('--username', prompt="Enter your FAS Username", help="FAS username") -@click.option('--password', prompt=True, hide_input=True, - help="FAS password") @click.option('--offset', default=0, help='Number of issue in pagure before import') @click.option('--nopush', is_flag=True, help="Do not push the result of pagure-importer back") def fedorahosted( - project_url, tags, private, username, password, offset, nopush): + project_url, tags, private, username, offset, nopush): + ''' For imports from fedorahosted ''' + + password = click.prompt("FAS password", hide_input=True) fasclient = FASclient(username, password, 'https://admin.fedoraproject.org/accounts') if project_url.endswith('.git'):