[PATCH] D146819: [llvm][github] Add good-first-issue comment to issues
Timm Bäder via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 24 09:08:34 PDT 2023
tbaeder created this revision.
tbaeder added reviewers: tstellar, aaron.ballman.
Herald added a project: All.
tbaeder requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Try adding a "good first issue" comment to github issues with that label, welcoming new contributors and listing a few first steps.
I think the actual comment needs some work, I wasn't sure if the steps I outlined can't be improved.
Also, the patch is completely untested since I'm not sure how I would test it at all.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D146819
Files:
llvm/utils/git/github-automation.py
Index: llvm/utils/git/github-automation.py
===================================================================
--- llvm/utils/git/github-automation.py
+++ llvm/utils/git/github-automation.py
@@ -18,6 +18,28 @@
import time
from typing import List, Optional
+beginner_comment =
+"""
+Hi!
+
+Thank you for your interest in working on this LLVM issue.
+As your first steps...
+
+ 1) Clone the git repository.
+ 2) Fix the issue locally.
+ 3) [Run the test suite](https://llvm.org/docs/TestingGuide.html#unit-and-regression-tests) locally.
+ 3.1) Remember that the subdirectories under `test/` create fine-grained testing target, so you can
+ e.g. use `make check-clang-ast` to only run Clang's AST tests.
+ 4) Create a `git` commit
+ 5) Run `git clang-format HEAD~1` to format your changes.
+ 6) Submit the patch to [Phabricator](https://reviews.llvm.org/).
+ 6.1) Don't forget to upload your patch with sufficient context, e.g. `git show HEAD -U99990`.
+
+For more instructions on how to submit a patch to LLVM, see our [documentation](https://llvm.org/docs/Contributing.html).
+
+If you have any further questions about this issue, don't hesitate to ask via a comment on this Github issue.
+"""
+
class IssueSubscriber:
@property
@@ -34,7 +56,12 @@
for team in self.org.get_teams():
if self.team_name != team.name.lower():
continue
- comment = '@llvm/{}'.format(team.slug)
+
+ comment = ''
+ if team.slug == 'issue-subscribers-good-first-issue':
+ comment = '{}\n'.format(beginner_comment)
+
+ comment += '@llvm/{}'.format(team.slug)
self.issue.create_comment(comment)
return True
return False
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146819.508120.patch
Type: text/x-patch
Size: 1757 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230324/9000c9cd/attachment.bin>
More information about the llvm-commits
mailing list