diff options
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/commit.rb | 4 | ||||
-rw-r--r-- | app/models/project_services/hip_chat_message.rb | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb index 14b558f..3bc38b6 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -95,7 +95,7 @@ class Commit < ActiveRecord::Base filter_param = tag? ? :tags : :branches config_processor.builds.each do |build_attrs| if build_attrs[filter_param] - builds.create!({project: project}.merge(build_attrs.extract!(:name, :commands, :tag_list))) + builds.create!({ project: project }.merge(build_attrs.extract!(:name, :commands, :tag_list))) end end end @@ -116,7 +116,7 @@ class Commit < ActiveRecord::Base def create_deploy_builds config_processor.deploy_builds_for_ref(ref).each do |build_attrs| - builds.create!({project: project}.merge(build_attrs)) + builds.create!({ project: project }.merge(build_attrs)) end end diff --git a/app/models/project_services/hip_chat_message.rb b/app/models/project_services/hip_chat_message.rb index 3ceed94..db0d58e 100644 --- a/app/models/project_services/hip_chat_message.rb +++ b/app/models/project_services/hip_chat_message.rb @@ -8,12 +8,14 @@ class HipChatMessage def to_s lines = Array.new lines.push("<a href=\"#{RoutesHelper.project_url(project)}\">#{project.name}</a> - ") + if commit.matrix? lines.push("<a href=\"#{RoutesHelper.project_ref_commit_url(project, commit.ref, commit.sha)}\">Commit ##{commit.id}</a></br>") else first_build = commit.builds_without_retry.first lines.push("<a href=\"#{RoutesHelper.project_build_url(project, first_build)}\">Build '#{first_build.name}' ##{first_build.id}</a></br>") end + lines.push("#{commit.short_sha} #{commit.git_author_name} - #{commit.git_commit_message}</br>") lines.push("#{humanized_status(commit_status)} in #{commit.duration} second(s).") lines.join('') |