Created
January 30, 2024 15:51
-
-
Save coderberry/7457cee155f79402bfe4b689d6721daa to your computer and use it in GitHub Desktop.
Run `bundle exec standardrb` on all files changed within the current pull request
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
file_list = `gh pr diff $(git rev-parse --abbrev-ref HEAD) --name-only` | |
pr_files = file_list.split("\n") | |
puts "Running standardrb --fix on:" | |
pr_files.each { |f| puts " - #{f}" } | |
puts # empty line | |
system("bundle exec standardrb --fix #{pr_files.join(' ')}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment