File tree Expand file tree Collapse file tree 1 file changed +22
-7
lines changed
Expand file tree Collapse file tree 1 file changed +22
-7
lines changed Original file line number Diff line number Diff line change @@ -45,17 +45,32 @@ jobs:
4545 with :
4646 github-token : ${{ secrets.DOCS_BOT_PAT_BASE }}
4747 script : |
48- // Get PR author username
4948 const pr = context.payload.pull_request;
5049 const prAuthor = pr.user.login;
50+ const assignees = (pr.assignees ?? [])
51+ .filter(a => a.login.toLowerCase() !== "copilot")
52+ .map(a => "@" + a.login)
53+ .join(" ");
5154
52- // Compose the comment body as a plain text message to post on the PR
53- const commentBody =
54- "👋 @" + prAuthor +
55- " - Please leave us feedback on your contributing experience! " +
56- "To do this, please go to `#docs-contributor-feedback` on Slack.";
55+ let commentBody;
56+
57+ if (assignees) {
58+ commentBody =
59+ "👋 " + assignees +
60+ " - Please leave us feedback on your contributing experience! " +
61+ "To do this, please go to `#docs-contributor-feedback` on Slack.";
62+ } else if (prAuthor.toLowerCase() !== "copilot") {
63+ commentBody =
64+ "👋 @" + prAuthor +
65+ " - Please leave us feedback on your contributing experience! " +
66+ "To do this, please go to `#docs-contributor-feedback` on Slack.";
67+ } else {
68+ // nobody to mention!
69+ commentBody =
70+ "👋 Please leave us feedback on your contributing experience! " +
71+ "To do this, please go to `#docs-contributor-feedback` on Slack.";
72+ }
5773
58- // Post the comment
5974 await github.rest.issues.createComment({
6075 owner: context.repo.owner,
6176 repo: context.repo.repo,
You can’t perform that action at this time.
0 commit comments