Skip to content

Commit bbb4631

Browse files
committed
[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.
1 parent 52040b4 commit bbb4631

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

llvm/utils/git/github-automation.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,9 +297,11 @@ 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}) ({merged_prs} [merged]({merged_prs_url}))
303305
* Top 3 Committers: {get_user_values_str(get_top_values(merged_by))}
304306
* Top 3 Reviewers: {get_user_values_str(get_top_values(reviewed_by))}
305307
"""

0 commit comments

Comments
 (0)