tink-ab / github-devstats Goto Github PK
View Code? Open in Web Editor NEWTool for tracking and analyzing developer contributions
License: BSD 2-Clause "Simplified" License
Tool for tracking and analyzing developer contributions
License: BSD 2-Clause "Simplified" License
I am interested in working with the output of the tool in jq
.
The current output (as defined by https://github.com/krlvi/github-devstats/blob/master//event/pr.go#L40-L44) is 1) not proper JSON and 2) hard to automatically make it proper JSON.
The current output looks like this:
{
....
},
{
....
},
...
{
....
},
Notice how it ends with a semicolon. This can easily be corrected by storing the output to a file and modifying the file using your favourite text editor, however that's annoying. Two outputs that would be parsable by jq
:
{
....
},
{
....
},
...
{
....
}
and/or
[
{
....
},
{
....
},
...
{
....
}
]
I vote for the former since it allows streaming the output easier.
TimeToApprove
and TimeToMerge
output is human friendly (since it's time.Duration
):
...
{
...
"time_to_merge": "2h38m9s",
...
"time_to_approve": "2h36m17s",
...
},
...
This is very hard to parse for actual statistics, so I propose we make them time_to_merge_seconds
and time_to_approve_seconds
instead.
$ go run ./cmd/github-devstats
go: downloading golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
go: downloading golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e
panic: runtime error: index out of range
goroutine 1 [running]:
main.main()
/Users/jrantil/src/github-devstats/cmd/github-devstats/main.go:13 +0x3e1
exit status 2
I had to resort to https://github.com/krlvi/github-devstats/blob/master/cmd/github-devstats/main.go to figure it out.
...such as Travis CI to make sure PRs don't break stuff.
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.