Giter Club home page Giter Club logo

ghstats's People

Contributors

ben1009 avatar jmpotato avatar overvenus avatar

Watchers

 avatar  avatar  avatar

ghstats's Issues

A bug that could lead to inaccurate statistics

We use updateRange to get all PRs and issues which are updated within the time range.

// updated:2021-05-23T21:00:00+08:00..2021-05-24T21:00:00+08:00
updateRange := fmt.Sprintf(" updated:%s..%s", start.Format(time.RFC3339), next.Format(time.RFC3339))

Then we use the current start and next to compare the SubmittedAt to check if the LGTM is in the range.

ghstats/cmd/cli_review.go

Lines 111 to 112 in a7ff97a

startTimestamp: start,
endTimestamp: next,

ghstats/cmd/cli_review.go

Lines 353 to 355 in a7ff97a

if !c.withinTimeRange(*prReview.SubmittedAt) {
continue
}

However, there is a possibility that the PR is updated within [start, next) but the review's SubmittedAt is before the start, so when we try to collect the reviews of multiple days, it will lead to some reviews being missed.

The solution is simple, I think we should directly use the whole start and end as the startTimestamp and endTimestamp.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.