diff options
author | Rémy Coutable <remy@rymai.me> | 2018-05-21 18:41:21 +0200 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-07-11 11:52:01 +0200 |
commit | 5679837cd412c2fb7911dcb33c19e89d8a787db0 (patch) | |
tree | fe9984ff05042df9ec0fc6de59e85171e337866d /danger/gemfile | |
parent | d2ea56a87026de92f31bbcfb360748fcf766b835 (diff) | |
download | gitlab-ce-5679837cd412c2fb7911dcb33c19e89d8a787db0.tar.gz |
Start to use Danger for automating MR reviews
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'danger/gemfile')
-rw-r--r-- | danger/gemfile/Dangerfile | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/danger/gemfile/Dangerfile b/danger/gemfile/Dangerfile new file mode 100644 index 00000000000..3d38959a9d0 --- /dev/null +++ b/danger/gemfile/Dangerfile @@ -0,0 +1,15 @@ +# rubocop:disable Style/SignalException + +gemfile_modified = git.modified_files.include?("Gemfile") +gemfile_lock_modified = git.modified_files.include?("Gemfile.lock") + +if gemfile_modified && !gemfile_lock_modified + msg = [ + "#{gitlab.html_link("Gemfile")} was edited but #{gitlab.html_link("Gemfile.lock")} wasn't.", + "Usually, when #{gitlab.html_link("Gemfile")} is updated, you should run", + "`bundle install && BUNDLE_GEMFILE=Gemfile.rails5 bundle install` or", + "`bundle update <the-added-or-updated-gem>` and commit the #{gitlab.html_link("Gemfile.lock")} changes." + ] + + warn msg.join(" ") +end |