Repository navigation
Workflow to comment on PRs from first time contributors - #34211
Conversation
AnneBeyer
left a comment
There was a problem hiding this comment.
Thank you for taking this up @jeremiedbb, I like the contributor introduction part and the approach with the welcome comment.
I just added two comments for discussion.
|
|
||
| - [ ] Fill out the [PR template](https://github.com/scikit-learn/scikit-learn/blob/main/.github/PULL_REQUEST_TEMPLATE.md) | ||
|
|
||
| - [ ] Make sure that the PR addresses an existing issue that is ready for |
There was a problem hiding this comment.
This is actually point 2 on the PR checklist.
There was a problem hiding this comment.
I know but I really wanted to highlight this point here. It's one of the main reasons we reject many PRs these days. Contributors don't read the warning that is at the top of the issue description.
There was a problem hiding this comment.
I agree that this makes sense.
There was a problem hiding this comment.
Could we also include "Make sure your code passes the tests / CI”? (Point 3 on the PR checklist)
There was a problem hiding this comment.
I think it could make sense to add a general entry to make sure all CI checks pass/are green (which apart from the tests also includes linting & co., codecov, successfully building the docs) and point to the PR checklist for details?
There was a problem hiding this comment.
Could we also include "Make sure your code passes the tests / CI”?
I did include that in the 3rd point
There was a problem hiding this comment.
See how attentive we read the checklist 🙈
| ...). If you are proposing a new feature, please open an issue to | ||
| discuss it first. | ||
|
|
||
| - [ ] Follow the [PR checklist](https://scikit-learn.org/stable/developers/contributing.html#pull-request-checklist). |
There was a problem hiding this comment.
Should we maybe use this opportunity to also clean up the PR checklist? (We put this on a future to-do list a while ago.)
There was a problem hiding this comment.
I agree that the PR check list and contribution doc can be improved but I'd rather not couple it with this PR. It would block it for a while and I didn't plan to do that myself. I'd rather have someone else work on it on a separate PR :)
|
|
||
| - [ ] Fill out the [PR template](https://github.com/scikit-learn/scikit-learn/blob/main/.github/PULL_REQUEST_TEMPLATE.md) | ||
|
|
||
| - [ ] Make sure that the PR addresses an existing issue that is ready for |
There was a problem hiding this comment.
Could we also include "Make sure your code passes the tests / CI”? (Point 3 on the PR checklist)
|
|
||
| post_comment: | ||
| name: welcome | ||
| if: github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' |
There was a problem hiding this comment.
This misses some users, because my PR to your repo actually has NONE here (though I'm not 100% sure how this differs from FIRST_TIME_CONTRIBUTER, as both seem to entail other activity on GitHub, see here), and there is also FIRST_TIMER for people who never contributed to any repo before.
We can try something like the following
| if: github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' | |
| if: contains(fromJson('["FIRST_TIME_CONTRIBUTOR", "FIRST_TIMER", "NONE"]'), | |
| github.event.pull_request.author_association) |
or there is also an official gh action, if we are fine with introducing another dependency for this.
|
The test on my fork now works (jeremiedbb#41) |
|
I'm trying to improve the rendering. Here's how it looks now: Thank you for opening your first pull request to scikit-learn! 🎉 Here are a few things to help get your contribution reviewed:
|
|
|
||
| Here are a few things to help get your contribution reviewed: | ||
|
|
||
| - Fill out the [PR template](https://github.com/scikit-learn/scikit-learn/blob/main/.github/PULL_REQUEST_TEMPLATE.md) |
There was a problem hiding this comment.
Since the PR will already be open, maybe
| - Fill out the [PR template](https://github.com/scikit-learn/scikit-learn/blob/main/.github/PULL_REQUEST_TEMPLATE.md) | |
| - Make sure you used the [PR template](https://github.com/scikit-learn/scikit-learn/blob/main/.github/PULL_REQUEST_TEMPLATE.md) |
There was a problem hiding this comment.
There are already 2 "make sure". I rephrased the whole comment to avoid this repetition.
|
I added a new bullet point to check that there's no other open PR for the same issue. I also rephared a bit to avoid some repetitions. The rendering is now: Thank you for opening your first pull request to scikit-learn! 🎉 To help get your contribution reviewed, please make sure that:
|
AnneBeyer
left a comment
There was a problem hiding this comment.
Thank you, @jeremiedbb, a tiny nit, otherwise LGTM!
Co-authored-by: Anne Beyer <[email protected]>
|
I just got that comment in this PR, so |
|
Yeah, you're listed as "member" and I've also seen it in a PR from a "contributor". |
|
So I was trying to be smart to avoid 3 lines of code but turned out it was bugged. I should have followed your suggestion from the start :) |
…#34211) Co-authored-by: Anne Beyer <[email protected]>
This PR proposes a gh workflow to post a comment on PRs opened by first time contributors.
It has 2 objectives:
Fixes #33707