Repository navigation
CI Close PR fixing an unready issue for early contributors - #35071
Conversation
I had the same hesitations several times already, so +1 for this PR. 5 merged PRs feels like enough to me, but 10 is fine too. |
virchan
left a comment
There was a problem hiding this comment.
LGTM! Thanks, @lesteve!
I definitely agree that a contributor knows what they are doing by their 11th PR. However, from my own experience, I was still getting familiar with the contribution workflow when I opened my 6th PR 😅.
So, I think 10 is a good starting point. We can always revisit the merged PR threshold if necessary.
@cakedev0 , could you approve this before I merge?
|
There is one approval from @virchan and a +1 in @cakedev0's #35071 (comment), let's self-merge this I will be on Triage next Monday (October 12), so I'll keep an eye on this to make sure it works as intended. In general, my personal rule is that one approval is enough for CI stuff (and PRs that don't affect users directly), unless there is something possibly controversial in it, which I think there isn't in this PR. IIRC we have some kind of wording somewhere that one approval is enough for "simple" PRs. There were even discussions that one approval + self-review after having waited a bit was OKish. The idea of waiting a bit (IMO one week is acceptable order of magnitude) delay is to make sure you have waited a bit for feed-back and that you have a fresh look at your own PR. And yes the threshold 10 is a bit arbitrary, and I am open to tweak it if we notice this is too annoying in practice. |
|
Just to double-check 1, I did a quick test with my worfklow logs that run on PR opened or edited are here if that helps: . They seem to take 15-20s which is OK I think. There are more workflows that I was expecting maybe because "edited" triggers on more things than I thought 🤔, not a big deal anyway. Any unintended side-effects, let me know 😉! Footnotes
|
What does this implement/fix? Explain your changes.
#34506 added the logic to close a PR from a first-time contributor when it fixes an issue that is not ready, e.g. has a "Needs Triage" or "Needs Investigation" label.
I think it makes sense to extend this rule to early contributors. The easiest thing to do is to have a threshold on the numbers of PR merged. 10 merged PRs kind of feels right to me and it's also the definition chosen by the JupyterHub triage board 1.
Why do we need this?
As a maintainer, I sometimes hesitate to merge a PR fixing a typo or link when I think the associated account is likely mostly automated. If I merged the PR, the associated account will escape the "close PR if issue not ready" rule, and I am not sure I want to take this "gamble".
Extending the rule to more than 10 PRs merged would make me more comfortable merging the PR.
Testing
I tested the workflow and script in the separate https://github.com/lesteve/scikit-learn-on-pr-created-or-edited-tests repo and it works, see lesteve/scikit-learn-on-pr-created-or-edited-tests#26 for a summary of what was tested. The testing was done with an agent as you can guess 😉.
cc @virchan who created the rule originally and @jeremiedbb whom I chatted quickly with about this.
Additional comments
I added some logic so that you don't get the welcome message when your PR gets closed automatically, which is the current behaviour I think, not 100% sure.
AI usage disclosure
I used AI assistance for:
Footnotes
see "Scaling “Maintainer Intuition” with Pull Request Triage Boards" blog post if you are curious about the context 😉 ↩