Skip to content

Utility gem to identify a repository's code owners based on the .github/CODEOWNERS file

License

Notifications You must be signed in to change notification settings

ben/code_owners

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
coaxis@gmail.com
License: MIT

About

Utility gem to identify a repository's code owners based on the .github/CODEOWNERS file

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%