nicokosi / hubstats

🧪 Command-line for GitHub pull request statistics
5 stars 0 forks source link

Incorrect counters if many pull requests #10

Open nicokosi opened 7 years ago

nicokosi commented 7 years ago

For example :

lein run --organization docker --repository docker --token $token --since-weeks 4                                         
pull requests for docker/docker ->
    since 4 week(s):
        18 opened / 43 commented / 16 closed
        opened per author: {"samattridge" 2, "aaronlehmann" 2, "yongtang" 1, "wojas" 1, "vieux" 1, "vdemeester" 1, "twang2218" 1, "pmelopereira" 1, "panmanphil" 1, "nishanttotla" 1, "krasi-georgiev" 1, "kklemmicknvidia" 1, "jhowardmsft" 1, "eZanmoto" 1, "alexandrevicenzi" 1, "albers" 1}
        commented per author: {"aaronlehmann" 9, "thaJeztah" 6, "johnstep" 5, "cpuguy83" 5, "stevvooe" 3, "dnephin" 3, "vdemeester" 2, "tianon" 2, "runcom" 2, "vikstrous" 1, "tophj-ibm" 1, "tonistiigi" 1, "ehazlett" 1, "cyli" 1, "allencloud" 1}
        closed per author: {"thaJeztah" 2, "cpuguy83" 1, "allencloud" 1}

But more pull requests have been created/closed (and probably commented), as seen via Monthly Pulse:

http https://github.com/docker/docker/pulse/monthly | grep -B 2 "Merged Pull Requests\|Proposed Pull Requests"
            274
          </span>
          Merged Pull Requests
--
            91
          </span>
          Proposed Pull Requests
nicokosi commented 7 years ago

GitHub REST API for events is currently used and has these limitations:

Events support pagination, however the per_page option is unsupported. The fixed page size is 30 items. Fetching up to ten pages is supported, for a total of 300 events.

Only events created within the past 90 days will be included in timelines. Events older than 90 days will not be included (even if the total number of events in the timeline is less than 300).

May GitHub GraphQL API usage fix these limitations?

nicokosi commented 4 years ago

See https://github.com/nicokosi/pullpito/issues/24#issue-349745356 for Graphql requests.

nicokosi commented 4 years ago

May the library lacinia be useful?