<commit_before># Github Issue Stats

Github issues are a decent way to track work on a small project; and with the rise of tools such as Waffle.io and ZenHub, it appears that they will slowly but surely become better and better for managing long term projects.

However statistical analysis of github issues is still very much lacking. `github-issue-stats` is a command line tool / gem that takes github searches and converts them into useful project reports.

## Installation & Usage
Assuming you are using Ruby 1.9.3 or above: `gem install github-issue-stats` will install the tool. Running `github-issue-stats "whatever github search string you want"` will run the search, outputting a closed by week report.

For a detailed list of options and command line flags, please refer to `github-issue-stats --help`.

**Please Note!** Github's Search API restricts searches to [the first 1,000 results](https://developer.github.com/v3/search/#about-the-search-api) and limits [unauthenticated requests to 10 per minute](https://developer.github.com/v3/search/#rate-limit). This means you can run 1 report per-minute that would return a full 1,000 issues.

I recommend using filters such as [`state:closed`](https://help.github.com/articles/searching-issues/#search-based-on-whether-an-issue-or-pull-request-is-open) and/or [`updated:>=2016-01-01`](https://help.github.com/articles/searching-issues/#search-based-on-when-an-issue-or-pull-request-was-created-or-last-updated) to scope your requests down, based upon the report type.

### Example
The following example shows how to get a closed by week report for Rails for the first 4 weeks of May 2016
```
$ github-issue-stats "repo:rails/rails type:issue is:closed closed:2016-05-01..2016-05-28"
2016-17 3 1<commit_msg>Rename docs to `github-stats` from `github-issue-stats`<commit_after># Github Issue Stats [![Gem Version](https://badge.fury.io/rb/github-stats.svg)](https://badge.fury.io/rb/github-stats)


Github issues are a decent way to track work on a small project; and with the rise of tools such as Waffle.io and ZenHub, it appears that they will slowly but surely become better and better for managing long term projects.

However statistical analysis of github issues is still very much lacking. `github-stats` is a command line tool / gem that takes github searches and converts them into useful project reports.

## Installation & Usage
Assuming you are using Ruby 1.9.3 or above: `gem install github-stats` will install the tool. Running `github-stats "whatever github search string you want"` will run the search, outputting a closed by week report.

For a detailed list of options and command line flags, please refer to `github-stats --help`.

**Please Note!** Github's Search API restricts searches to [the first 1,000 results](https://developer.github.com/v3/search/#about-the-search-api) and limits [unauthenticated requests to 10 per minute](https://developer.github.com/v3/search/#rate-limit). This means you can run 1 report per-minute that would return a full 1,000 issues.

I recommend using filters such as [`state:closed`](https://help.github.com/articles/searching-issues/#search-based-on-whether-anor-pull-request-is-open) and/or [`updated:>=2016-01-01`](https://help.github.com/articles/searching-issues/#search-based-on-when-anor-pull-request-was-created-or-last-updated) to scope your requests down, based upon the report type.

### Example
The following example shows how to get a closed by week report for Rails for the first 4 weeks of May 2016
```
$ github-stats "repo:rails/rails type:issue is:closed closed:2016-05-01..2016-05-28"
2016-17 3 1
{'fraction_non_alphanumeric': 0.10033076074972437, 'fraction_numerical': 0.029217199558985666, 'mean_word_length': 4.6003086419753085, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6825917', 'n_tokens_mistral': 1112, 'n_tokens_neox': 986, 'n_words': 424}