octohat 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +1 -0
- data/Gemfile +2 -0
- data/LICENSE +28 -0
- data/README.md +57 -0
- data/Rakefile +1 -0
- data/bin/octohat +12 -0
- data/code-of-conduct.md +22 -0
- data/lib/octohat/version.rb +3 -0
- data/lib/octohat.rb +29 -0
- data/octohat.gemspec +25 -0
- metadata +98 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 5580fe1db63b64b2a18b4018f8a7573af7bce95c
|
4
|
+
data.tar.gz: 7ddfb4782659c10f897a46d17af1b83681b3afae
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 683cfeb49062019bfa08ba4d2e28d51e95d24a53a0ca0ca4adb264e49eeac1ab98747e68caad2c40fedf52c617ab2baa2cb1bddd1284030c8d7b85e1f6dfa07a
|
7
|
+
data.tar.gz: 0478ca46202747967a2243054f92364d8917f578290c766254b3038e784756a82d55b17068223ca68b647405482c09b483b781018149bfc6a4c9ed1078929561
|
data/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
*.gem
|
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
Copyright (c) 2015, Katie McLaughlin
|
2
|
+
All rights reserved.
|
3
|
+
|
4
|
+
Redistribution and use in source and binary forms, with or without
|
5
|
+
modification, are permitted provided that the following conditions are met:
|
6
|
+
|
7
|
+
* Redistributions of source code must retain the above copyright notice, this
|
8
|
+
list of conditions and the following disclaimer.
|
9
|
+
|
10
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
11
|
+
this list of conditions and the following disclaimer in the documentation
|
12
|
+
and/or other materials provided with the distribution.
|
13
|
+
|
14
|
+
* Neither the name of octohat nor the names of its
|
15
|
+
contributors may be used to endorse or promote products derived from
|
16
|
+
this software without specific prior written permission.
|
17
|
+
|
18
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
19
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
20
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
21
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
22
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
23
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
24
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
25
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
26
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
27
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
28
|
+
|
data/README.md
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
Octohat
|
2
|
+
=======
|
3
|
+
|
4
|
+
It's easy to see your direct [code contributions](https://help.github.com/articles/why-are-my-contributions-not-showing-up-on-my-profile/) on GitHub, but what about everything else?
|
5
|
+
|
6
|
+
**Octohat** takes a github repo name, and returns a list of every github user that has interacted with a project, but has not committed code.
|
7
|
+
|
8
|
+
Interactions include:
|
9
|
+
|
10
|
+
- raising or commenting on an issue
|
11
|
+
- raising or commenting on a pull request
|
12
|
+
- commenting on a commit
|
13
|
+
|
14
|
+
"Let's All Build a Hat Rack" ([\#LABHR](https://twitter.com/search?q=%23LABHR&src=typd)) is an original concept by [Leslie
|
15
|
+
Hawthorn](http://hawthornlandings.org/2015/02/13/a-place-to-hang-your-hat/)
|
16
|
+
|
17
|
+
WARNING
|
18
|
+
-------
|
19
|
+
|
20
|
+
[octohat in Python](https://github.com/glasnt/octohat) and [octohat in Ruby](https://github.com/glasnt/octohat-rb) both create callable `octohat` entites. Strange things may occur if you try to install both on your system.
|
21
|
+
|
22
|
+
|
23
|
+
Installation
|
24
|
+
------------
|
25
|
+
|
26
|
+
```
|
27
|
+
gem install octohat
|
28
|
+
```
|
29
|
+
|
30
|
+
Usage
|
31
|
+
-----
|
32
|
+
|
33
|
+
```
|
34
|
+
octohat <user/repo>
|
35
|
+
```
|
36
|
+
|
37
|
+
e.g. `octohat glasnt/octohat-rb`
|
38
|
+
|
39
|
+
Define an environment variable for "GITHUB\_TOKEN" to use an [authentication token](https://help.github.com/articles/creating-an-access-token-for-command-line-use/) (allows for deeper searching)
|
40
|
+
|
41
|
+
To do
|
42
|
+
-----
|
43
|
+
|
44
|
+
- Get the gem working properly
|
45
|
+
- Port all python-version functionality
|
46
|
+
- Incorporate more ruby-isms
|
47
|
+
- All the other things
|
48
|
+
|
49
|
+
Code of Conduct
|
50
|
+
---------------
|
51
|
+
|
52
|
+
Octohat operates under a [Code of Conduct](https://github.com/glasnt/octohat-rb/blob/master/code-of-conduct.md).
|
53
|
+
|
54
|
+
License
|
55
|
+
-------
|
56
|
+
|
57
|
+
Octohat is distributed under the [MIT license](https://github.com/glasnt/octohat-rb/blob/master/LICENSE).
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/bin/octohat
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'octohat'
|
4
|
+
|
5
|
+
repo = ARGV[0]
|
6
|
+
|
7
|
+
puts "Collecting information for #{repo} (this may take a while)"
|
8
|
+
grok = Octohat.grok repo
|
9
|
+
|
10
|
+
puts "Code contributions: #{grok[:code].length}"
|
11
|
+
puts "Non-code contributions: #{grok[:non_code].length}"
|
12
|
+
puts grok[:non_code]
|
data/code-of-conduct.md
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
|
4
|
+
|
5
|
+
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality.
|
6
|
+
|
7
|
+
Examples of unacceptable behavior by participants include:
|
8
|
+
|
9
|
+
* The use of sexualized language or imagery
|
10
|
+
* Personal attacks
|
11
|
+
* Trolling or insulting/derogatory comments
|
12
|
+
* Public or private harassment
|
13
|
+
* Publishing other's private information, such as physical or electronic addresses, without explicit permission
|
14
|
+
* Other unethical or unprofessional conduct.
|
15
|
+
|
16
|
+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team.
|
17
|
+
|
18
|
+
This code of conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.
|
19
|
+
|
20
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
|
21
|
+
|
22
|
+
This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/)
|
data/lib/octohat.rb
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
require "octohat/version"
|
2
|
+
require "octokit"
|
3
|
+
|
4
|
+
module Octohat
|
5
|
+
def self.grok(repo)
|
6
|
+
|
7
|
+
access_token = ENV["GITHUB_TOKEN"]
|
8
|
+
|
9
|
+
client = Octokit::Client.new(:access_token => access_token)
|
10
|
+
Octokit.auto_paginate = true
|
11
|
+
|
12
|
+
contributors = client.contributors(repo).map{|c| c.login}
|
13
|
+
|
14
|
+
activity = []
|
15
|
+
|
16
|
+
client.issues(repo, state: "all").each do |issue|
|
17
|
+
activity << issue.user.login
|
18
|
+
activity << client.issue_comments(repo, issue.number).map{|comment| comment.user.login}.uniq
|
19
|
+
end
|
20
|
+
|
21
|
+
activity << client.list_commit_comments(repo).map{|comment| comment.user.login}
|
22
|
+
|
23
|
+
activity.flatten!.uniq!.sort!
|
24
|
+
|
25
|
+
non_code = activity.select{|a| !contributors.include? a }
|
26
|
+
|
27
|
+
return { code: contributors, non_code: non_code }
|
28
|
+
end
|
29
|
+
end
|
data/octohat.gemspec
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'octohat/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "octohat"
|
8
|
+
spec.version = Octohat::VERSION
|
9
|
+
spec.authors = ["Katie McLaughlin"]
|
10
|
+
spec.email = ["katie@glasnt.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{Hang your non-code contributions on your hat rack.}
|
13
|
+
spec.description = %q{Grok a github repo to find all the non-code contributors}
|
14
|
+
spec.homepage = "https://github.com/glasnt/octohat-rb"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
+
spec.require_paths = ["lib"]
|
19
|
+
spec.executables << "octohat"
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.9"
|
22
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
23
|
+
|
24
|
+
spec.add_runtime_dependency "octokit", "~> 4.0"
|
25
|
+
end
|
metadata
ADDED
@@ -0,0 +1,98 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: octohat
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Katie McLaughlin
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-09-11 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.9'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.9'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: octokit
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '4.0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '4.0'
|
55
|
+
description: Grok a github repo to find all the non-code contributors
|
56
|
+
email:
|
57
|
+
- katie@glasnt.com
|
58
|
+
executables:
|
59
|
+
- octohat
|
60
|
+
extensions: []
|
61
|
+
extra_rdoc_files: []
|
62
|
+
files:
|
63
|
+
- ".gitignore"
|
64
|
+
- Gemfile
|
65
|
+
- LICENSE
|
66
|
+
- README.md
|
67
|
+
- Rakefile
|
68
|
+
- bin/octohat
|
69
|
+
- code-of-conduct.md
|
70
|
+
- lib/octohat.rb
|
71
|
+
- lib/octohat/version.rb
|
72
|
+
- octohat.gemspec
|
73
|
+
homepage: https://github.com/glasnt/octohat-rb
|
74
|
+
licenses:
|
75
|
+
- MIT
|
76
|
+
metadata: {}
|
77
|
+
post_install_message:
|
78
|
+
rdoc_options: []
|
79
|
+
require_paths:
|
80
|
+
- lib
|
81
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
82
|
+
requirements:
|
83
|
+
- - ">="
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - ">="
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '0'
|
91
|
+
requirements: []
|
92
|
+
rubyforge_project:
|
93
|
+
rubygems_version: 2.4.5
|
94
|
+
signing_key:
|
95
|
+
specification_version: 4
|
96
|
+
summary: Hang your non-code contributions on your hat rack.
|
97
|
+
test_files: []
|
98
|
+
has_rdoc:
|