Permalink
Browse files

always show the irc push header, even if no new commits were added

  • Loading branch information...
1 parent 9202f1c commit 303b53ee4e1e8ec4c7e80d9fea481f9cab4d8010 @technoweenie technoweenie committed Dec 20, 2012
Showing with 4 additions and 10 deletions.
  1. +4 −10 services/irc.rb
View
14 services/irc.rb
@@ -7,7 +7,6 @@ class Service::IRC < Service
default_events :push, :pull_request
def receive_push
- return if distinct_commits.empty?
return unless branch_name_matches?
messages = []
@@ -186,10 +185,8 @@ def irc_push_summary_message
message << "at #{fmt_hash after_sha}"
end
- if distinct_commits.any?
- num = distinct_commits.size
- message << "(+\002#{num}\017 new commit#{num > 1 ? 's' : ''})"
- end
+ num = distinct_commits.size
+ message << "(+\002#{num}\017 new commit#{num != 1 ? 's' : ''})"
end
elsif deleted?
@@ -205,12 +202,9 @@ def irc_push_summary_message
message << "fast-forwarded #{fmt_branch branch_name} from #{fmt_hash before_sha} to #{fmt_hash after_sha}"
end
- elsif distinct_commits.any?
- num = distinct_commits.size
- message << "pushed \002#{num}\017 new commit#{num > 1 ? 's' : ''} to #{fmt_branch branch_name}"
-
else
- message << "pushed nothing"
+ num = distinct_commits.size
+ message << "pushed \002#{num}\017 new commit#{num != 1 ? 's' : ''} to #{fmt_branch branch_name}"
end
message.join(' ')

0 comments on commit 303b53e

Please sign in to comment.