[llvm] [workflows] Update commit access request PR links (PR #146169)

David Peixotto via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 30 09:31:55 PDT 2025


https://github.com/dmpots updated https://github.com/llvm/llvm-project/pull/146169

>From bbb46311d0ef21d3ba420bde4ddd5dedd5e355de Mon Sep 17 00:00:00 2001
From: David Peixotto <peix at meta.com>
Date: Fri, 27 Jun 2025 13:57:48 -0700
Subject: [PATCH 1/2] [workflows] Update commit access request PR links

This PR updates the links used to show the PR contribution stats of the user
requesting commit access to the LLVM project. The link previously would only
show the PRs that were currently opened by the user because the
`/pulls/<username>` endpoint automatically applies the `is:open` filter.

The contribution guidelines suggest that the user should have at least 3 merged
PRs to be considered for commit access so this seems like a relavant data point
to add.

We now show all PRs that the user has created and a separate link for the PRs
that are merged.
---
 llvm/utils/git/github-automation.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/llvm/utils/git/github-automation.py b/llvm/utils/git/github-automation.py
index eb1abb2f37f20..69655e9f3c26e 100755
--- a/llvm/utils/git/github-automation.py
+++ b/llvm/utils/git/github-automation.py
@@ -297,9 +297,11 @@ def run(self) -> bool:
                 print(e)
                 continue
 
+        total_prs_url = f"https://github.com/llvm/llvm-project/pulls?q=author%3A{self.issue.user.login}+is%3Apr"
+        merged_prs_url = total_prs_url + "+is%3Amerged"
         comment = f"""
             ### Activity Summary:
-            * [{total_prs} Pull Requests](https://github.com/llvm/llvm-project/pulls/{self.issue.user.login}) ({merged_prs} merged)
+            * [{total_prs} Pull Requests]({total_prs_url}) ({merged_prs} [merged]({merged_prs_url}))
             * Top 3 Committers: {get_user_values_str(get_top_values(merged_by))}
             * Top 3 Reviewers: {get_user_values_str(get_top_values(reviewed_by))}
         """

>From e133238607be496024dbb77aef13ecad70eeeb79 Mon Sep 17 00:00:00 2001
From: David Peixotto <peix at meta.com>
Date: Mon, 30 Jun 2025 09:31:43 -0700
Subject: [PATCH 2/2] Move merged PRs link to separate line

---
 llvm/utils/git/github-automation.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/llvm/utils/git/github-automation.py b/llvm/utils/git/github-automation.py
index 69655e9f3c26e..948788d501d1d 100755
--- a/llvm/utils/git/github-automation.py
+++ b/llvm/utils/git/github-automation.py
@@ -301,7 +301,8 @@ def run(self) -> bool:
         merged_prs_url = total_prs_url + "+is%3Amerged"
         comment = f"""
             ### Activity Summary:
-            * [{total_prs} Pull Requests]({total_prs_url}) ({merged_prs} [merged]({merged_prs_url}))
+            * [{total_prs} Pull Requests]({total_prs_url})
+            * [{merged_prs} Merged Pull Requests]({merged_prs_url})
             * Top 3 Committers: {get_user_values_str(get_top_values(merged_by))}
             * Top 3 Reviewers: {get_user_values_str(get_top_values(reviewed_by))}
         """



More information about the llvm-commits mailing list