[sysadmin-bin] A project is either under GNOME or Infrastructure



commit 671bc73a6fe043b0b80ef9e8b939bec885854f39
Author: Andrea Veri <averi redhat com>
Date:   Wed Jun 17 16:40:38 2020 +0200

    A project is either under GNOME or Infrastructure

 close_pull_requests.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/close_pull_requests.py b/close_pull_requests.py
index 76b5280..b8ad0c3 100755
--- a/close_pull_requests.py
+++ b/close_pull_requests.py
@@ -146,7 +146,10 @@ def create_gl_issue(repo_name, title, body, patch_url, mr_url, contributor):
         sys.exit(1)
 
     gl = gitlab.Gitlab('https://gitlab.gnome.org', GITLAB_PRIVATE_RW_TOKEN, api_version=4)
-    project = gl.projects.get('GNOME/%s' % repo_name)
+    try:
+        project = gl.projects.get('GNOME/%s' % repo_name)
+    except gitlab.exceptions.GitlabGetError:
+        project = gl.projects.get('Infrastructure/%s' % repo_name)
 
     vars = dict(user=contributor, patch_url=patch_url, body=body, mr_url=mr_url)
     desc = ISSUE_TEMPLATE.substitute(vars)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]