Skip to content

Latest commit

 

History

History
39 lines (29 loc) · 1016 Bytes

README.md

File metadata and controls

39 lines (29 loc) · 1016 Bytes

Utility gem for .github/CODEOWNERS introspection

Install

gem install code_owners

Usage

your/repo/path$ code_owners

Output

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

Development

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

Author

Jonathan Cheatham
[email protected]
License: MIT