Utility gem for .github/CODEOWNERS introspection
gem install code_owners
your/repo/path$ code_owners
vendor/cache/cloudfiles-1.4.16.gem UNOWNED
vendor/cache/code_owners-1.0.1.gem jcheatham per line 213, vendor/*/code_owners*
vendor/cache/coderay-1.1.0.gem UNOWNED
Maybe put it in a cleanliness test, like:
it "does not introduce new unowned files" do
unowned_files = CodeOwners.ownerships.select { |f| f[:owner] == "UNOWNED" }
# this number should only decrease, never increase!
assert_equal 12345, unowned_files.count, "Claim ownership of your new files in .github/CODEOWNERS to fix this test!"
end
Jonathan Cheatham
coaxis@gmail.com
License: MIT