RubocopPr
CLI Issues and PR creator for Rubocop Cops. 1 linter == 1 issue == 1 PR.
Simplify the inception or version bump of Rubocop on the project.
With RubocopPr you can apply Rubocop clean and in a few minutes, see the example.
Requirements
- Ruby 2.1+
- Hub 2.12.3 (tested with this version only, but should work with older versions)
- Github
Installation
Add this line to your application's Gemfile:
gem 'rubocop_pr', require: false
And then execute:
$ bundle
Or install it yourself as:
$ gem install rubocop_pr
Usage
Usage: rubocop_pr [options]
-k, --post-checkout [command] Running after each git checkout (default: "")
-c, --continue Continue previous session (default: false)
-b, --branch [branch] internal branch with '.rubocop_todo.yml' (default: 'rubocop_todo_branch')
-m, --master [branch] branch which will be the base for all PR's (default: 'master')
-v, --version Display version
-o, --origin [origin] origin option for 'git push' (default: 'origin')
-u, --hub-version [version] Set manually minimum required version of 'hub' utility for github (default: 2.12.3)
-i, --issue-labels [labels] Labels for created issues, separated by comma (default: rubocop)
-p [labels], Labels for created pull requests, separated by comma (default: rubocop)
--pull-request-labels
-a, --issue-assignees [name] Issue assignees, separated by comma (default: "")
-t [name], Pull request assignees, separated by comma (default: "")
--pull-request-assignees
-r [name], Pull request reviewers, separated by comma (default: "")
--pull-request-reviewers
-g, --repository [name] Set repository host (default: github)
-l, --limit [limit] Limit the PS's for one run (default: 10)
-h, --help Display help
Notes
-
brach
option is useful, if you want to prepare the.rubocop-todo.yml
manually and feed it torubocop_pr
. -
post-checkout
handy for old Ruby versions, when shell may "forget" Ruby version.
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/kvokka/rubocop_pr. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
License
The gem is available as open source under the terms of the MIT License.
Code of Conduct
Everyone interacting in the RubocopPr project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.