octohatrack 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: cb238713cccae0074b43785cbcf3851187583928
4
+ data.tar.gz: 6cda4fa5b410232890b7f65a9f0f762c11468015
5
+ SHA512:
6
+ metadata.gz: b0bc7e894e00f02b309685db475d3c5bf099a230f5e74767aa22ba2b0fe6918176d23a17495b554956d5de340e9b54316b854134aa6063cd4c1ac640bac68278
7
+ data.tar.gz: aee1d7e33e8879d242226820cdd653c64ae7e146ae5d177e3689bc8bcaf30a1579b72f9e39b390457aa9af14c4e872c15fed36aa6b50761b75061a398d599c2f
@@ -0,0 +1,2 @@
1
+ *.gem
2
+ Gemfile.lock
@@ -0,0 +1,8 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.1.0
4
+ install:
5
+ - 'rake build'
6
+ - 'gem install pkg/*'
7
+ script:
8
+ - "octohat glasnt/octohat"
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source 'https://rubygems.org'
2
+ gemspec
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 this project 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
+
@@ -0,0 +1,61 @@
1
+ octohatrack
2
+ =======
3
+
4
+ [![Gem Version](https://badge.fury.io/rb/octohatrack.svg)](http://badge.fury.io/rb/octohatrack) [![Build Status](https://travis-ci.org/LABHR/octohatrack-rb.svg)](https://travis-ci.org/LABHR/octohatrack-rb)
5
+
6
+ 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?
7
+
8
+ **Octohatrack** takes a github repo name, and returns a list of every github user that has interacted with a project, but has not committed code.
9
+
10
+ Interactions include:
11
+
12
+ - raising or commenting on an issue
13
+ - raising or commenting on a pull request
14
+ - commenting on a commit
15
+
16
+ "Let's All Build a Hat Rack" ([\#LABHR](https://twitter.com/search?q=%23LABHR&src=typd)) is an original concept by [Leslie
17
+ Hawthorn](http://hawthornlandings.org/2015/02/13/a-place-to-hang-your-hat/)
18
+
19
+ This project is not affiliated with GitHub.
20
+
21
+ WARNING
22
+ -------
23
+
24
+ [octohatrack in Python](https://github.com/LABHR/octohatrack) and [octohatrack in Ruby](https://github.com/LABHR/octohatrack-rb) both create callable `octohatrack` entites. Strange things may occur if you try to install both on your system.
25
+
26
+
27
+ Installation
28
+ ------------
29
+
30
+ ```
31
+ gem install octohatrack
32
+ ```
33
+
34
+ Usage
35
+ -----
36
+
37
+ ```
38
+ octohatrack <user/repo>
39
+ ```
40
+
41
+ e.g. `octohatrack LABHR/octohatrack-rb`
42
+
43
+ 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)
44
+
45
+ To do
46
+ -----
47
+
48
+ - Get the gem working properly
49
+ - Port all python-version functionality
50
+ - Incorporate more ruby-isms
51
+ - All the other things
52
+
53
+ Code of Conduct
54
+ ---------------
55
+
56
+ Octohat operates under a [Code of Conduct](https://github.com/LABHR/octohatrack-rb/blob/master/code-of-conduct.md).
57
+
58
+ License
59
+ -------
60
+
61
+ Octohat is distributed under the [MIT license](https://github.com/LABHR/octohatrack-rb/blob/master/LICENSE).
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'octohatrack'
4
+
5
+ repo = ARGV[0]
6
+
7
+ puts "Collecting information for #{repo} (this may take a while)"
8
+ grok = Octohatrack.grok repo
9
+
10
+ puts "Code contributions: #{grok[:code].length}"
11
+ puts "Non-code contributions: #{grok[:non_code].length}"
12
+ puts grok[:non_code]
@@ -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/)
@@ -0,0 +1,29 @@
1
+ require "octohatrack/version"
2
+ require "octokit"
3
+
4
+ module Octohatrack
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
@@ -0,0 +1,3 @@
1
+ module Octohatrack
2
+ VERSION = "0.0.1"
3
+ end
@@ -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 'octohatrack/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "octohatrack"
8
+ spec.version = Octohatrack::VERSION
9
+ spec.authors = ["Katie McLaughlin"]
10
+ spec.email = ["katie@glasnt.com"]
11
+
12
+ spec.summary = %q{Grok a github repo to find all the non-code contributors}
13
+ spec.description = %q{Grok a github repo to find all the non-code contributors}
14
+ spec.homepage = "https://github.com/LABHR/octohatrack-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 << "octohatrack"
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: octohatrack
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-11-21 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
+ - octohatrack
60
+ extensions: []
61
+ extra_rdoc_files: []
62
+ files:
63
+ - ".gitignore"
64
+ - ".travis.yml"
65
+ - Gemfile
66
+ - LICENSE
67
+ - README.md
68
+ - Rakefile
69
+ - bin/octohatrack
70
+ - code-of-conduct.md
71
+ - lib/octohatrack.rb
72
+ - lib/octohatrack/version.rb
73
+ - octohatrack.gemspec
74
+ homepage: https://github.com/LABHR/octohatrack-rb
75
+ licenses:
76
+ - MIT
77
+ metadata: {}
78
+ post_install_message:
79
+ rdoc_options: []
80
+ require_paths:
81
+ - lib
82
+ required_ruby_version: !ruby/object:Gem::Requirement
83
+ requirements:
84
+ - - ">="
85
+ - !ruby/object:Gem::Version
86
+ version: '0'
87
+ required_rubygems_version: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ version: '0'
92
+ requirements: []
93
+ rubyforge_project:
94
+ rubygems_version: 2.4.5.1
95
+ signing_key:
96
+ specification_version: 4
97
+ summary: Grok a github repo to find all the non-code contributors
98
+ test_files: []