From 86a7e9b4f80efdbaa5e4f2a8bc979e0fc2981cf7 Mon Sep 17 00:00:00 2001 From: Lucas Farah Date: Thu, 31 Aug 2017 14:29:44 -0300 Subject: [PATCH] Not showing multiple file error bug (#450) When user selects the following, Danger can't show the multiple file error: - [ ] Changed more than one extension, but all changes are related --- Dangerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dangerfile b/Dangerfile index 3bc6c04..db60ce1 100644 --- a/Dangerfile +++ b/Dangerfile @@ -18,7 +18,7 @@ if git.commits.any? { |c| c.message =~ /^Merge branch '#{github.branch_for_base} end # Restrict changing only one extension per PR -if git.modified_files.grep(/^Sources\//).count > 1 +if (git.modified_files.grep(/^Sources\//).count > 1) && (github.pr_body.include? "- [ ] Changed more than one extension, but all changes are related") fail("Please, modify only one extension per pull request.") end