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 from ARGV
options = {}
OptionParser.new do |parser|
parser.banner = "My shiny tool"
OrganizationAudit.optparse(parser, options)
end.parse!
Options
- :user
- :organization
- :token (see below)
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
- organization license audit audit all repos for used licenses
- bundler organization audit audit all repos for ruby and gem vulnerabilities
Author
Michael Grosser
michael@grosser.it
License: MIT