You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[GitHub] Add Greeting comment to new contributor's PRs with useful information
This adds a new workflow that responds to PRs that are opened
by new contributors with a comment thanking the author for their contribution,
and provides answers to common problems (problem for now, could expand later).
According to my testing, and the docs here:
https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target
`opened` will only trigger on the first opening, not a re-open.
I considered including this comment in the one the labeller adds,
but that means that it would be emailed to all subscribers not just
the author.
This comment is only left for authors new to the LLVM repo or to
GitHub itself. This is done by checking the value in:
https://docs.github.com/en/graphql/reference/enums#commentauthorassociation
# We assume that this is only called for a PR that has just been opened
221
+
# by a user new to LLVM and/or GitHub itself.
222
+
223
+
# This text is using Markdown formatting.
224
+
comment=f"""\
225
+
Thank you for submitting a Pull Request (PR) to the LLVM Project!
226
+
227
+
You can add reviewers by using the "Reviewers" section on this page.
228
+
229
+
If this is not working for you, it's probably because you don't have write
230
+
permissions for the repository. In which case you can instead tag reviewers by
231
+
name in a comment by using `@` followed by their GitHub username.
232
+
233
+
If you have received no comments on your PR for a week, you can request a review
234
+
by "ping"ing the PR by adding a comment “Ping”. The common courtesy "ping" rate
235
+
is once a week. Please remember that you are asking for valuable time from other developers.
236
+
237
+
If you have further questions, they may be answered by the [LLVM GitHub User Guide](https://llvm.org/docs/GitHub.html).
238
+
239
+
You can also ask questions in a comment on this PR, on the [LLVM Discord](https://discord.com/invite/xS7Z362) or on the [forums](https://discourse.llvm.org/)."""
240
+
self.pr.as_issue().create_comment(comment)
241
+
returnTrue
242
+
243
+
214
244
defsetup_llvmbot_git(git_dir="."):
215
245
"""
216
246
Configure the git repo in `git_dir` with the llvmbot account so
0 commit comments