From 50ca9e2be97fabb8dfa9f4808aa13b13f60a0ed9 Mon Sep 17 00:00:00 2001 From: Nenad Vujicic Date: Mon, 4 Nov 2024 17:02:27 +0100 Subject: [PATCH 1/4] Update Dangerfile Added new rule --- Dangerfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Dangerfile b/Dangerfile index 3148bafb69..aac399a8f7 100644 --- a/Dangerfile +++ b/Dangerfile @@ -30,3 +30,11 @@ 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 +if git.modified_files.include?("Gemfile") && git.modified_files.exclude?("Gemfile.lock") + 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 From 3de459ba2a2c0d1bf573285efdfd6c264d28b966 Mon Sep 17 00:00:00 2001 From: Nenad Vujicic Date: Mon, 4 Nov 2024 17:26:07 +0100 Subject: [PATCH 2/4] Update Dangerfile Updated Dangerfile --- Dangerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dangerfile b/Dangerfile index aac399a8f7..390c032c5a 100644 --- a/Dangerfile +++ b/Dangerfile @@ -1,3 +1,5 @@ +require 'active_support/core_ext/enumerable' + # Get PR number pr_number = github.pr_json["number"] From 339f833244c1c03fc5e1bbc4f65f05522deae82f Mon Sep 17 00:00:00 2001 From: Nenad Vujicic Date: Mon, 4 Nov 2024 17:31:22 +0100 Subject: [PATCH 3/4] Update Dangerfile Updated Dangerfile --- Dangerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dangerfile b/Dangerfile index 390c032c5a..9fd39fe3ba 100644 --- a/Dangerfile +++ b/Dangerfile @@ -1,4 +1,4 @@ -require 'active_support/core_ext/enumerable' +require "active_support/core_ext/enumerable" # Get PR number pr_number = github.pr_json["number"] From f1209b29e5a85717f5038252b213923b52bb0975 Mon Sep 17 00:00:00 2001 From: Nenad Vujicic Date: Mon, 4 Nov 2024 17:28:06 +0100 Subject: [PATCH 4/4] Test --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index b83011542a..3711739a82 100644 --- a/Gemfile +++ b/Gemfile @@ -46,7 +46,7 @@ gem "sprockets-exporters_pack" # Restore File.exists? for oauth gem gem "file_exists" -# Load rails plugins +# Load rails pluginss gem "actionpack-page_caching", ">= 1.2.0" gem "activerecord-import" gem "active_record_union"