From 44af25c4e1ba0cb01da7e3acbd2e71a9b25810fd Mon Sep 17 00:00:00 2001 From: Ian Wahbe Date: Mon, 27 Nov 2023 13:02:46 -0800 Subject: [PATCH] Don't close upgrade PRs (#730) If labels have been applied to a PR, then assume a human will address it and don't close it. All upstream upgrade PRs have a `needs-release/{minor,patch}` label. Other upgrade PRs have `auto-merge` set (already handled). --- scripts/close_outdated_bridge_prs.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/close_outdated_bridge_prs.py b/scripts/close_outdated_bridge_prs.py index e502d21c70..6f7692dde2 100755 --- a/scripts/close_outdated_bridge_prs.py +++ b/scripts/close_outdated_bridge_prs.py @@ -54,6 +54,14 @@ def close_outdated(repo: str): # "name": "Pulumi Bot" # } # }, + # "labels": [ + # { + # "id": "LA_kwDODYna9c8AAAABbWB-nw", + # "name": "needs-release/patch", + # "description": "", + # "color": "BFD4F2" + # } + # ], # "number": 2204, # "title": "Upgrade pulumi-terraform-bridge to v3.66.0" # } @@ -64,6 +72,9 @@ def close_outdated(repo: str): # auto-merge: we don't need to close # non-bot author: not our concern continue + if issue["labels"]: + continue + issue_title = issue["title"] issue_number = issue["number"] cmd("gh", "pr", "close", str(issue_number), "--repo", repo, prefix=f"Closing \"{issue_title}\":\n\t")