[llvm] [workflows] Close issues used for backports once the PR has been created (PR #80394)

Tom Stellard via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 1 22:23:47 PST 2024


https://github.com/tstellar created https://github.com/llvm/llvm-project/pull/80394

This will allow us to track the state of the backport request in the PR, rather than in the issue.  The state updates for PRs can be automated, so this will save us some triage work.

>From e853ba57f58623e32dffc8c1bee6b68dc2f5ef4b Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Fri, 2 Feb 2024 05:26:47 +0000
Subject: [PATCH] [workflows] Close issues used for backports once the PR has
 been created

This will allow us to track the state of the backport request in the PR,
rather than in the issue.  The state updates for PRs can be automated,
so this will save us some triage work.
---
 llvm/utils/git/github-automation.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/llvm/utils/git/github-automation.py b/llvm/utils/git/github-automation.py
index 04698cacbff92..62eb9db2578d9 100755
--- a/llvm/utils/git/github-automation.py
+++ b/llvm/utils/git/github-automation.py
@@ -577,6 +577,10 @@ def create_pull_request(self, owner: str, repo_name: str, branch: str) -> bool:
 
             pull.as_issue().edit(milestone=self.issue.milestone)
 
+            # Once the pull request has been created, we can close the
+            # issue that was used to request the cherry-pick
+            self.issue.edit(state='closed', state_reason='completed')
+
             try:
                 self.pr_request_review(pull)
             except Exception as e:



More information about the llvm-commits mailing list