From 848fefd19a6fbcb239da073853c32643ac8ecacc Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Wed, 14 Nov 2012 09:21:39 -0800 Subject: [PATCH] Ignore projects whose org we do not control. In the manage_projects.py script ignore any project whose Github org we do not control. Do not create a Github project, gerrit project, or manage any ACLs. Change-Id: I0d4595c49ffa7762976a433bf9b16fc6fcaf73e5 Reviewed-on: https://review.openstack.org/16102 Reviewed-by: James E. Blair Approved: Jeremy Stanley Reviewed-by: Jeremy Stanley Tested-by: Jenkins --- modules/gerrit/files/scripts/manage_projects.py | 6 +++++- .../templates/review-dev.projects.yaml.erb | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/gerrit/files/scripts/manage_projects.py b/modules/gerrit/files/scripts/manage_projects.py index 9efdfb5fc2..cf88fb3e3e 100755 --- a/modules/gerrit/files/scripts/manage_projects.py +++ b/modules/gerrit/files/scripts/manage_projects.py @@ -237,7 +237,11 @@ try: has_issues = 'has-issues' in options or default_has_issues has_downloads = 'has-downloads' in options or default_has_downloads has_wiki = 'has-wiki' in options or default_has_wiki - org = orgs_dict[project_split[0].lower()] + try: + org = orgs_dict[project_split[0].lower()] + except KeyError: + # We do not have control of this github org ignore the project. + continue try: repo = org.get_repo(repo_name) except github.GithubException: diff --git a/modules/openstack_project/templates/review-dev.projects.yaml.erb b/modules/openstack_project/templates/review-dev.projects.yaml.erb index 29c580575a..cfcea96f70 100644 --- a/modules/openstack_project/templates/review-dev.projects.yaml.erb +++ b/modules/openstack_project/templates/review-dev.projects.yaml.erb @@ -9,6 +9,7 @@ has-downloads: False --- - project: gtest-org/gtest +- project: completely-bogus-org/test - project: gtest-org/test - project: gtest-org/test2 - project: gtest-org/test3