Audit all repos of your organization or user
Ruby
Switch branches/tags
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
spec
.gitignore
.travis.yml
Gemfile
Gemfile.lock
MIT-LICENSE
Rakefile
Readme.md
organization_audit.gemspec

Readme.md

Audit all repos of your organization or user

Install

gem install organization_audit

Usage

Token has to be passed or is fetched from git config github.token.

require 'organization_audit'

OrganizationAudit.all(:user => "anamartinez").each do |repo|
  if !repo.private? && repo.gem? && repo.content("Gemfile").to_s.include?("rake")
    puts "#{repo.name} includes rake!"
  end
end

Commandline tool: fetch :user/:token/:organization/:ignore/:ignore_gems

options = {}
OptionParser.new do |parser|
  parser.banner = "My shiny tool"
  OrganizationAudit.optparse(parser, options)
end.parse!

Options

  • :user
  • :organization
  • :token (see below)
  • :ignore (do not include these repos with this url or name)

Token

create a token that has access to your repositories

curl -v -u your-user-name -X POST https://api.github.com/authorizations --data '{"scopes":["repo"]}'
enter your password -> TOKEN

Related

Author

Michael Grosser
michael@grosser.it
License: MIT
Build Status