#575: added logic for BuildList notification

This commit is contained in:
Vokhmin Alexey V 2012-09-16 22:18:41 +04:00
parent 5326098884
commit 2681a1c676
1 changed files with 12 additions and 0 deletions

View File

@ -132,6 +132,18 @@ class ActivityFeedObserver < ActiveRecord::Observer
if [BuildList::BUILD_PUBLISHED, BuildServer::SUCCESS, BuildServer::BUILD_ERROR, BuildServer::PLATFORM_NOT_FOUND,
BuildServer::PROJECT_NOT_FOUND, BuildServer::PROJECT_VERSION_NOT_FOUND, BuildList::FAILED_PUBLISH].include? record.status or
(record.status == BuildList::BUILD_PENDING && record.bs_id_changed?)
=begin
unless record.mass_build
if (record.auto_publish? &&
[BuildList::BUILD_PUBLISHED, BuildList::FAILED_PUBLISH].include? record.status) ||
(!record.auto_publish? && )
users =
UserMailer.build_list_notification(record, record.user) if record.user.
end
end
=end
record.project.owner_and_admin_ids.each do |recipient|
ActivityFeed.create(
:user => User.find(recipient),