bruceauyeung / github-contrib-stats Goto Github PK
View Code? Open in Web Editor NEWThis project forked from yshnb/github-stat
statistics analysis of the numbers of merged/LGTM'ed/open PRs in specified repos for specified user(s)
This project forked from yshnb/github-stat
statistics analysis of the numbers of merged/LGTM'ed/open PRs in specified repos for specified user(s)
currently only overall statistics is implemented.we shoud add statistics per week /per month
listing pull requests takes lots of time. we should consider adding progress bar while doing statistics.
considering that we have a config statBeginTime
to avoid listing all pull requests, we can not design a progress bar at pull request page level. but we can design it at pull request level.
a rough thought:
( ( number of finished open pull requests ) + ( number of finished closed pull requests ) ) / ( ( number of total open pull requests ) + ( number of total closed pull requests ) )
( ( number of total open pull requests ) + ( number of total closed pull requests ) )
actually is number of repositories
* 2
for example, a PR needs rebase, but operator rebased it and merged it in github website, this will result in a extra commit in that PR. this kind of commit usually look like "Merge branch 'master' into ***".
we should filter out this kind of PR
currently we use stackalyticsDeviation
mechanism. but this is inherent incorrect. we should list commits on a repository ( https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository ) and filter them by user, date period, etc.
there is a bug waiting for fixed
if a man import some codes from one repository to another, like this pr:
kubernetes/community /pull/118
( i don't want make a link points to that pr , it will notice the participants in that pr )
the pr imported some docs form repo kubernetes/kubernetes
to repo kubernetes/community
with commit logs
so a person who commit in repo kubernetes/kubernetes
now will have a copy in kubernetes/community
too(but different SHA, i.e. you have tow commits are totally same but different SHA in two repos). in this case , the author and the committer of these two commits are same, so here comes the problem.
the scheme that we find a pr form a commit is that :
i also doubt whether it is reduntant that specified author arg when searching pr. may be specified repos arg is enough. if returns many, we could filter them by author's name.
displaying github-username ( real name ) in USERNAME column looks good enough.
merged column should look like this:
merged
--------------------
PRs | Commits
--------------------
x | y
--------------------
panic: Get https://api.github.com/repos/kubernetes/test-infra/commits?author=StudyNick&per_page=100: net/http: TLS handshake timeout
goroutine 1 [running]:
panic(0x672940, 0xc047f83260)
D:/Go/src/runtime/panic.go:500 +0x1af
/d/GOPATH/INTERNAL/src/github.com/bruceauyeung/github-contrib-stats/githubstat.getStackalyticsCommits(0xc0420e0ea0, 0xc0422d0100, 0xa, 0xc0422d00d0, 0xa, 0xc0
42039f60, 0x9, 0x0, 0x0, 0x0)
d:/GOPATH/INTERNAL/src/github.com/bruceauyeung/github-contrib-stats/githubstat/metrics_commit_request.go:129 +0x598
/d/GOPATH/INTERNAL/src/github.com/bruceauyeung/github-contrib-stats/githubstat.(*PullRequestMetricsRequest).FetchMetrics(0xc042064058, 0xc0420e8780, 0x0)
d:/GOPATH/INTERNAL/src/github.com/bruceauyeung/github-contrib-stats/githubstat/metrics_pull_request.go:486 +0x5f3
main.main()
d:/GOPATH/INTERNAL/src/github.com/bruceauyeung/github-contrib-stats/main.go:50 +0x418
exit status 2
error: GET https://api.github.com/search/issues?page=1&per_page=100&q=beeb65b4eafc2bf78349aaf1035401be24b87f5f+repo%3Akubernetes%2Fkubernetes.github.io+type%3Ap
r+author%3Axiangpengzhao: 403 API rate limit exceeded for bruceauyeung.; rate reset in -21.3340042s
error: GET https://api.github.com/search/issues?page=1&per_page=100&q=beeb65b4eafc2bf78349aaf1035401be24b87f5f+repo%3Akubernetes%2Fkubernetes.github.io+type%3Ap
r+author%3Axiangpengzhao: 403 API rate limit exceeded for bruceauyeung.; rate reset in -21.6160042s
error: GET https://api.github.com/search/issues?page=1&per_page=100&q=facd9bcce7aa046b3dd6baa326ba292fedf9b7b3+repo%3Akubernetes%2Fkubernetes.github.io+type%3Ap
r+author%3AYuPengZTE: 403 API rate limit exceeded for bruceauyeung.; rate reset in -23.5020042s
for example, a github project may have thousands of close PRs. retrieving them over and over again will result in performance penalty. but cosidering closed PRs can be reopened, i have no idea how we can cache them.
currently only numbers of merged / lgtmed / nonlgtmed PRs of individual users are presented in the final statistics table.
http://stackalytics.com also do statistics analysis about Commits in Kubernetes. but stackalytics count commits incorrectly(most of time more than actual value).
we should add a config stackalyticsDeviation
for each user , then we can render a table view of stackalytics version(incorrect version)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.