From 74aa19ac3b504fa8d68f53f10d590c16fe8df4d4 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Thu, 8 Nov 2012 11:51:01 +0100 Subject: [PATCH] Reverse the close-pull logic. We have a huge list of projects with all of them listing "close-pull" as an option. Turns out we want to close pull requests for all of them - so instead, let's only indicate 'has-pull-requests' if there is ever a project for whom we do not want to close pull requests. Change-Id: I4db31d324b7f260ea24f538ac5f5fc8e1feca75d Reviewed-on: https://review.openstack.org/15626 Reviewed-by: James E. Blair Reviewed-by: Clark Boylan Reviewed-by: Paul Belanger Reviewed-by: Jeremy Stanley Approved: Monty Taylor Tested-by: Jenkins --- files/scripts/close_pull_requests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/scripts/close_pull_requests.py b/files/scripts/close_pull_requests.py index 2ab0c64..441aab9 100755 --- a/files/scripts/close_pull_requests.py +++ b/files/scripts/close_pull_requests.py @@ -18,7 +18,7 @@ # - project: PROJECT_NAME # options: -# - close-pull +# - has-pull-requests # Github authentication information is read from github.secure.config, # which should look like: @@ -68,7 +68,7 @@ for section in config: project = section['project'] # Make sure we're supposed to close pull requests for this project: - if 'options' not in section or 'close-pull' not in section['options']: + if 'options' in section and 'has-pull-requests' in section['options']: continue # Find the project's repo