implement CLI

This commit is contained in:
dechert
2023-06-14 13:53:36 +02:00
parent 9a2f1f7cb8
commit b74fd6695f
3 changed files with 97 additions and 61 deletions

16
glcifinder-cli.py Normal file
View File

@@ -0,0 +1,16 @@
import click
import gitlab_api_finder
@click.command()
@click.option("--count", default=1, help="Number of jobs to search.")
@click.option("--projectid", prompt="Id of Gitlab Project", help="Id of Gitlab Project.")
@click.option("--jobname", prompt="name of job to filter", help="Id of Gitlab Project.")
def hello(count, projectid, jobname):
gitlab_api_finder.find_jobs(count, projectid, jobname)
# example usage: python glcifinder-cli.py --count 1000 --projectid 244 --jobname deploy-test
if __name__ == '__main__':
hello()