summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/scripts/GitHub.py23
1 files changed, 18 insertions, 5 deletions
diff --git a/.github/scripts/GitHub.py b/.github/scripts/GitHub.py
index bc0f355206..5db2060ca9 100644
--- a/.github/scripts/GitHub.py
+++ b/.github/scripts/GitHub.py
@@ -221,16 +221,29 @@ def add_reviewers_to_pr(
f"::error title=User is not a Collaborator!::{', '.join(non_collaborators)}"
)
+ repo_admins = [
+ a.login for a in repo_gh.get_collaborators(permission="admin")
+ ]
+
leave_pr_comment(
token,
owner,
repo,
pr_number,
- f"⚠ **WARNING: Cannot add reviewers**: A user specified as a "
- f"reviewer for this PR is not a collaborator "
- f"of the edk2 repository. Please add them as a collaborator to the "
- f"repository and re-request the review.\n\n"
- f"Users requested:\n{', '.join(user_names)}",
+ f"⚠ **WARNING: Cannot add some reviewers**: A user "
+ f"specified as a reviewer for this PR is not a collaborator "
+ f"of the repository. Please add them as a collaborator to "
+ f"the repository so they can be requested in the future.\n\n"
+ f"Non-collaborators requested:\n"
+ f"{'\n'.join([f'- @{c}' for c in non_collaborators])}"
+ f"\n\nAttn Admins:\n"
+ f"{'\n'.join([f'- @{a}' for a in repo_admins])}\n---\n"
+ f"**Admin Instructions:**\n"
+ f"- Add the non-collaborators as collaborators to the "
+ f"appropriate team(s) listed in "
+ f"[teams](https://github.com/orgs/tianocore/teams)\n"
+ f"- If they are no longer needed as reviewers, remove them "
+ f"from [`Maintainers.txt`](https://github.com/tianocore/edk2/blob/HEAD/Maintainers.txt)",
)
# Add any new reviewers to the PR if needed.