Skip to content
This repository has been archived by the owner on May 10, 2018. It is now read-only.

Commit

Permalink
Merge pull request #550 from travis-ci/ar-fix-multiple-notificactions
Browse files Browse the repository at this point in the history
Add build:canceled event to Email EventHandler
  • Loading branch information
anarosas committed May 9, 2016
2 parents af74ded + ee78340 commit 3512abe
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion lib/travis/addons/email/event_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module Email
class EventHandler < Event::Handler
API_VERSION = 'v2'

EVENTS = 'build:finished'
EVENTS = ['build:finished', 'build:canceled']

def handle?
!pull_request? && config.enabled?(:email) && config.send_on_finished_for?(:email) && recipients.present?
Expand Down
1 change: 0 additions & 1 deletion lib/travis/event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,3 @@ def client_event(event, object)
end
end
end

1 change: 0 additions & 1 deletion lib/travis/event/subscription.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,3 @@ def increment_counter(event)
end
end
end

1 change: 0 additions & 1 deletion lib/travis/model/build/states.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ def cancel_job
if matrix_finished?
finalize_cancel
denormalize(:cancel)
notify(:cancel)
end
end

Expand Down

0 comments on commit 3512abe

Please sign in to comment.