lib/travis/cli/monitor.rb in travis-1.6.2.travis.369.4 vs lib/travis/cli/monitor.rb in travis-1.6.2.travis.370.4
- old
+ new
@@ -29,11 +29,12 @@
def setup
super
repos.map! { |r| repo(r) }
repos.concat(user.repositories) if my_repos?
- setup_notification(repos.any? || :dummy) unless notification
+ setup_notification(!firehose? || :dummy) unless notification
+ debug "Using notifications: #{notification.class.name[/[^:]+$/]}"
end
def setup_notification(type = nil)
refuse = false
case type
@@ -59,9 +60,13 @@
def events
events = %w[build:started build:finished]
events << 'job:started' << 'job:finished' unless builds?
events
+ end
+
+ def firehose?
+ org? and repos.empty?
end
def all?
!pull? and !push?
end