-
Notifications
You must be signed in to change notification settings - Fork 128
Do something with the contributor list #41
Comments
Apologies. This is a long comment. There's a lot of context that goes with it. So...way back in #38 it was identified that some users were, oddly, not appearing in the contributors response. This was fixed by adding a short list of the users identified who were known to not be showing up in the contributors response. The problem goes well beyond those two users. Let's take a look at the main Rust repo. Here's what GitHub has to say about the number of contributors: Let's take a look at the contributors request (specifically the header in the response):
That shows there's only five pages of contributors of 100 users each! That must mean that Highfive is greeting repeat contributors all of the time in rust-lang/rust. (You probably already see this, but I don't pay very close attention there right now.) What is going on?! Well, let's try the
That shows there's twenty-four pages of contributors of 100 users each. It also lets us finally see User Aatch (I'm not @-ing him since I would guess he's not inclined to participate in this discussion).
It seems like it's collapsed all of his contributions into that one email address because I didn't find his other email address in any of the responses. The numbers don't quite add up. Anyway, twenty-four pages is closer, but now it's higher than expected. Here's the critical part from the documentation:
This seems like a critical issue with the way Highfive is currently identifying first-time contributors in popular repositories since Highfive is attempting to match usernames. Here are a couple alternatives we could look at:
|
There an example of this in rust-lang/rust#49329. An earlier, already merged, PR from that user is in rust-lang/rust#48076. |
The commit search API looks like it does what Highfive really wants (easily determine if a given user has commits on the default branch). Like the |
Given that GH can see this because it gives you the option of highlighting PRs from first-time contributors, I assume there must be API for it. Probably commit search is it, but there might also be something in the GraphQL API? I don't understand the fork issue. Does that just mean it doesn't work for Rust Highfive, for example? |
The current approach to checking for new contributors does not work in repositories with more than 500 contributors because the contributors list API endpoint only associates the first 500 committer emails with GitHub usernames. See rust-lang#41 for more explanation. This commit modifies the new contributor check to use the commit search API endpoint. A drawback of this approach is that (at least currently) that endpoint does not provide useful information for fork repositories, which is why the new contributor check has a condition on whether the repository is a fork.
There might be. I can take a look.
That's right. Commit searches on fork repositories like rust-lang-nursery/highfive say that everyone has made zero commits. |
We currently maintain a list of contributors per repo which supplements the list we pull from GitHub. We could be more efficient (albeit more stateful) by updating this list with contributors as we go along. We could either do this manually, or use a DB instead. See some discussion in #38
The text was updated successfully, but these errors were encountered: