зеркало из https://github.com/mozilla/pjs.git
Mozbot spams channels when it notices that tinderbox is down. This makes it shut up when it notices lots of changes. b=126063, r=imajes
This commit is contained in:
Родитель
75a8116eee
Коммит
7cfa7ab1ad
|
@ -1,3 +1,4 @@
|
|||
# -*- Mode: perl; tab-width: 4; indent-tabs-mode: nil; -*-
|
||||
################################
|
||||
# Tinderbox Module #
|
||||
################################
|
||||
|
@ -255,12 +256,20 @@ sub CheckForUpdates {
|
|||
}
|
||||
|
||||
# speak!
|
||||
my @output = (@newTrees, @lostTrees, @newBuilds, @lostBuilds);
|
||||
foreach (@{$self->{'channels'}}) {
|
||||
unless ($mutedChannels{$_}) {
|
||||
local $event->{'target'} = $_;
|
||||
foreach (@newTrees, @lostTrees, @newBuilds, @lostBuilds, @changes) {
|
||||
foreach (@changes) {
|
||||
$self->say($event, $_);
|
||||
}
|
||||
if (@output < 3) {
|
||||
foreach (@output) {
|
||||
$self->say($event, $_);
|
||||
}
|
||||
} else {
|
||||
$self->say($event, "Many tree changes just occured. Check tinderbox to see what they were.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче