Skip to content

Commit 2daafaf

Browse files
dmpotsmahesh-attarde
authored andcommitted
[workflows] Update commit access request PR links (llvm#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.
1 parent 556aec4 commit 2daafaf

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

llvm/utils/git/github-automation.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,9 +297,12 @@ def run(self) -> bool:
297297
print(e)
298298
continue
299299

300+
total_prs_url = f"https://github.com/llvm/llvm-project/pulls?q=author%3A{self.issue.user.login}+is%3Apr"
301+
merged_prs_url = total_prs_url + "+is%3Amerged"
300302
comment = f"""
301303
### Activity Summary:
302-
* [{total_prs} Pull Requests](https://github.com/llvm/llvm-project/pulls/{self.issue.user.login}) ({merged_prs} merged)
304+
* [{total_prs} Pull Requests]({total_prs_url})
305+
* [{merged_prs} Merged Pull Requests]({merged_prs_url})
303306
* Top 3 Committers: {get_user_values_str(get_top_values(merged_by))}
304307
* Top 3 Reviewers: {get_user_values_str(get_top_values(reviewed_by))}
305308
"""

0 commit comments

Comments
 (0)