WIP: A simple utility that outputs statistics about the GitHub issues of an organization or a single repository.
- Clone this repository:
git clone https://github.com/jacquerie/github-issues.git
- Install the dependencies:
cd github-issues && npm install
The following commands are available:
$ node cli.js repoName
where repoName
is the name of a GitHub repository (example: jquery/jquery
),
which will output a JSON representation of the minimum, average and maximum age
in seconds of its issues. For example:
{
"name": "jquery/jquery",
"issues": {
"open": {
"count": 101,
"age": {
"min": 159645,
"avg": 9957576,
"max": 15914514
}
},
"closed": {
"count": 286,
"age": {
"min": 6,
"avg": 1272570,
"max": 13886977
}
}
},
"pulls": {
"open": {
"count": 12,
"age": {
"min": 500368,
"avg": 4812883,
"max": 15188154
}
},
"closed": {
"count": 1786,
"age": {
"min": 6,
"avg": 1407592,
"max": 52149399
}
}
}
}
There's also:
$ node cli.js orgName
where orgName
is the name of a GitHub organization (example: jquery
), which
will output one such record for every repository under the organization.
Finally:
$ grunt
which will lint and style check the code using jsonlint
, jshint
and jscs
so that it follows jQuery's style
guide.
It's strongly suggested to create a Personal Access Token from
https://github.com/settings/applications. You can then save it into a file
called TOKEN
and use it to populate the TOKEN
environment variable with
$ export TOKEN=$(<TOKEN)
Jacopo Notarstefano (@Jaconotar)
MIT