2018-07-26 22:25:40 +08:00
|
|
|
if github.pr_json && (github.pr_json["additions"] || 0) > 250 || (github.pr_json["deletions"] || 0) > 250
|
2018-07-26 02:36:09 +08:00
|
|
|
warn("This pull request is big! We prefer smaller PRs whenever possible, as they are easier to review. Can this be split into a few smaller PRs?")
|
2018-07-24 22:12:15 +08:00
|
|
|
end
|
|
|
|
|
2018-07-25 01:35:47 +08:00
|
|
|
prettier_offenses = `prettier --list-different "app/assets/stylesheets/**/*.scss" "app/assets/javascripts/**/*.es6" "test/javascripts/**/*.es6"`.split('\n')
|
2018-07-24 23:31:57 +08:00
|
|
|
if !prettier_offenses.empty?
|
2018-07-24 22:12:15 +08:00
|
|
|
fail(%{
|
2018-07-26 22:53:45 +08:00
|
|
|
This PR has multiple prettier offenses. <a href='https://meta.discourse.org/t/prettier-code-formatting-tool/93212'>Using prettier</a>\n
|
2018-07-26 23:03:36 +08:00
|
|
|
#{prettier_offenses.map { |o| github.html_link(o) }.join("\n")}
|
2018-07-24 22:12:15 +08:00
|
|
|
})
|
|
|
|
end
|