GitabCodeownersChecker

GitabCodeownersChecker is a CLI utility that is aimed to help with:

  • finding project files without CODEOWNERS mention
  • checking if CODEOWNERS references are set for specific files

Installation

Add this line to your application's Gemfile:

gem install 'gitab_codeowners_checker' --source 'https://nexus.sbmt.io/repository/ruby-gems-sbermarket/'

Usage

Getting help

gitlab-codeowners-checker help check_codeowners

List project files without owners

gitlab-codeowners-checker check_codeowners -p app/controllers app/jobs app/consumers -i app/controllers/concerns -e rb -r /app/instamart/

Checking specific files

gitlab-codeowners-checker check_codeowners -r /app/instamart/ --files app/jobs/shoppers/separate_reviews/export_shipment_review_rate_job.rb app/jobs/shipments/store_fiscal_data_job.rb

Checking files changed within MR

gitlab-codeowners-checker check_codeowners -r /app/instamart/ --files $({ git diff $(git merge-base --fork-point origin/master) --name-only --diff-filter=MA | uniq | grep '\.rb$'; })

Development

After checking out the repo, run bin/setup to install dependencies. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and the created tag, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitLab at https://gitlab.sbmt.io/nstmrt/rubygems/gitlab-codeowners-checker.