open-sauced / app

🍕 Insights into your entire open source ecosystem.
https://pizza.new
Apache License 2.0
414 stars 222 forks source link

Feature: Lottery Factor chart for multiple repositories #3530

Open isabensusan opened 3 months ago

isabensusan commented 3 months ago

Suggested solution

Context

Our current Lottery Factor chart provides really good insight into who's contributing to a specific project, but it's limited to showing contribution data for only one repository.

image

The problem is that projects are usually made up of different repositories, where there might or might not be contributor overlap, so being able to see this information across an organization could give some interesting insights.

Proposal

Create a Lottery Factor chart to be surfaced in repository insights and shows Lottery Factor across many different repositories.

This would show active contributors for all the repositories in the repository insight, with information on the amount of commits made by each contributor, and the % of the total that they represent. We'd also show the repositories within the repository insight where they have made those commits.

image
github-actions[bot] commented 3 months ago

Thanks for the issue, our team will look into it as soon as possible! If you would like to work on this issue, please wait for us to decide if it's ready. The issue will be ready to work on once we remove the "needs triage" label.

To claim an issue that does not have the "needs triage" label, please leave a comment that says ".take". If you have any questions, please reach out to us on Discord or follow up on the issue itself.

For full info on how to contribute, please check out our contributors guide.

jpmcb commented 3 months ago

FYI, for a subset of repos, the v2/repos/lotto endpoint already supports multiple repos. Example:

curl -X 'GET' \
  'https://api.opensauced.pizza/v2/repos/lotto?repos=pgvector%2Fpgvector%2Cqdrant%2Fqdrant&range=30&prev_days_start_date=0' \
  -H 'accept: application/json'

This gets the lotto factor for both pgvector and qdrant combined:

{
  "all_contribs": [
    {
      "contributor": "coszio",
      "count": 29,
      "percent_of_total": 0.22137404580152673,
      "lotto_factor": "moderate"
    },

    // etc. etc.

    {
      "contributor": "MarchLiu",
      "count": 1,
      "percent_of_total": 0.007633587786259542,
      "lotto_factor": "low"
    }
  ],
  "all_lotto_factor": "moderate",
  "grace_period_end": "2020-06-29T21:37:01.000Z"
}