Created
February 22, 2013 13:53
-
-
Save nicomen/5013524 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/hubot/scripts/githook.coffee b/hubot/scripts/githook.coffee | |
index 34a706a..c809059 100644 | |
--- a/hubot/scripts/githook.coffee | |
+++ b/hubot/scripts/githook.coffee | |
@@ -181,7 +181,10 @@ module.exports = (robot) -> | |
message += "#{ if e.forced then "force-" else "" }pushed #{ M.NO("commit", e.commits.length) } " | |
message += "to #{ branch }" | |
message += " (#{ short or e.compare })" | |
- for commit in e.commits[-3..] | |
- message += "\n · #{ commit.message.split("\n")[0] } (#{ commit.id.substring(0,8) })" | |
+ if commits.length > 1 | |
+ for commit in e.commits[-3..] | |
+ message += "\n · #{ commit.message.split("\n")[0] } (#{ commit.id.substring(0,8) })" | |
+ else | |
+ message += " · #{ commit.message.split("\n")[0] } (#{ commit.id.substring(0,8) })" | |
sender message |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment