From: Tom Hughes Date: Mon, 4 Nov 2024 19:02:14 +0000 (+0000) Subject: Merge remote-tracking branch 'upstream/pull/5301' X-Git-Tag: live~582 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/abea45aa56c3360d7f309b9517cb7a7e3af99cc5?hp=1b9b67fa8f592a76bb3f69a96a5365983f962f44 Merge remote-tracking branch 'upstream/pull/5301' --- diff --git a/Dangerfile b/Dangerfile index 3148bafb6..6e2aeced8 100644 --- a/Dangerfile +++ b/Dangerfile @@ -30,3 +30,13 @@ if git.commits.any? { |c| c.parents.count > 1 } else auto_label.remove("merge-commits") end + +# Check if Gemfile is modified but Gemfile.lock is not +gemfile_modified = git.modified_files.include?("Gemfile") +gemfile_lock_modified = git.modified_files.include?("Gemfile.lock") +if gemfile_modified && !gemfile_lock_modified + warn("Gemfile was updated, but Gemfile.lock wasn't updated. Usually, when Gemfile is updated, you should run `bundle install` to update Gemfile.lock.") + auto_label.set(pr_number, "gemfile-lock-outdated", "F9D0C4") +else + auto_label.remove("gemfile-lock-outdated") +end