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

David Peixotto via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 27 15:05:31 PDT 2025


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

This PR updates the links used to show the PR contribution stats of the user requesting commit access to the LLVM project. Previously we 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 relevant data point to add.

We now show all PRs that a user has created (not just the open ones) and a separate link for the PRs that are merged.

>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] [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))}
         """



More information about the llvm-commits mailing list