[llvm] [workflows] Create a more descriptive title and body when creating a … (PR #80396)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 2 06:27:45 PST 2024


================
@@ -567,9 +567,15 @@ def create_pull_request(self, owner: str, repo_name: str, branch: str) -> bool:
             print("PR already exists...")
             return True
         try:
+            commit_message = repo.get_commit(commits[-1]).commit.message
+            message_lines = commit_message.splitlines()
+            body = ""
+            if len(message_lines) > 1:
+                body = "".join(message_lines.splitlines()[1:])
+            title = "Backport {} {}".format(" ".join(commits), message_lines[0])
----------------
nikic wrote:

I'd move the commit ID from the header to the body. That way it will get auto-linked.

https://github.com/llvm/llvm-project/pull/80396


More information about the llvm-commits mailing list