From d3c3b0cf6d22bb518f08111e17a3a3058dde1943 Mon Sep 17 00:00:00 2001 From: Daniel Ma Date: Mon, 15 May 2017 08:46:45 -0700 Subject: [PATCH] fix(Reminder): no notifications unless someone is working If it's not a work hour for _any_ of the suggested reviewers, don't bother sending a notification Fixes #14 --- lib/review_bot/reminder.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/review_bot/reminder.rb b/lib/review_bot/reminder.rb index e48334e..7f37c78 100644 --- a/lib/review_bot/reminder.rb +++ b/lib/review_bot/reminder.rb @@ -74,7 +74,7 @@ def potential_notifications pull.reviewers.include?(reviewer['github']) end - next if suggested_reviewers.empty? + next if suggested_reviewers.select(&:work_hour?).empty? Notification.new( pull_request: pull,