From d946262af63e743c620f60bf7c0ce9564c7fca43 Mon Sep 17 00:00:00 2001 From: Muhammad Soban Javed <58461728+iamsobanjaved@users.noreply.github.com> Date: Thu, 22 Apr 2021 16:15:18 +0500 Subject: [PATCH] feat: added --ignore-repo flag in get_org_repo_urls command (#163) We want to ignore a repo which was created as part of a test of GitHub's security advisory process, during repo-health-dashboard checks run Issue: BOM-2472 --- edx_repo_tools/dev/get_org_repo_urls.py | 7 ++++++- setup.py | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/edx_repo_tools/dev/get_org_repo_urls.py b/edx_repo_tools/dev/get_org_repo_urls.py index 28a5d1ad..1e7a5ed5 100644 --- a/edx_repo_tools/dev/get_org_repo_urls.py +++ b/edx_repo_tools/dev/get_org_repo_urls.py @@ -27,8 +27,11 @@ @click.option( '--add_archived', is_flag=True, default=False, help="Do you want urls for archived repos?") +@click.option( + '--ignore-repo', '-i', multiple=True, default=[], + help="If you want to ignore any repo?") @pass_github -def main(hub, forks, org, url_type, output_file, add_archived): +def main(hub, forks, org, url_type, output_file, add_archived, ignore_repo): """ Used to get the urls for all the repositories in a github organization """ @@ -38,6 +41,8 @@ def main(hub, forks, org, url_type, output_file, add_archived): continue if repo.archived and not add_archived: continue + if repo.name in ignore_repo: + continue if url_type == "ssh": repositories.append(repo.ssh_url) else: diff --git a/setup.py b/setup.py index 5470254b..a17382a2 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ setup( name='edx-repo-tools', - version='0.3.0', + version='0.3.1', description="This repo contains a number of tools Open edX uses for working with GitHub repositories.", long_description=long_description, license='Apache',