Skip to content

Commit

Permalink
Don't close upgrade PRs (#730)
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
iwahbe authored Nov 27, 2023
1 parent 77a466b commit 44af25c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions scripts/close_outdated_bridge_prs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
# }
Expand All @@ -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")
Expand Down

0 comments on commit 44af25c

Please sign in to comment.