File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change 22
22
23
23
throw ( :halt , 400 ) unless room
24
24
25
+ message = "[#{ repository } /#{ branch } ]\n "
26
+ message += commits . map do |commit |
27
+ "#{ commit [ 'id' ] [ 0 ..5 ] } #{ commit [ 'message' ] } - #{ commit [ 'author' ] [ 'name' ] } "
28
+ end . join ( "\n " )
29
+
25
30
if commits . size > 1
26
- commit = commits . last
27
31
before , after = payload [ 'before' ] , payload [ 'after' ]
28
- compare_url = payload [ 'repository' ] [ 'url' ] + "/compare/#{ before } ...#{ after } "
29
- room . speak "[#{ repository } /#{ branch } ] #{ commit [ 'message' ] } (+#{ commits . size - 1 } more commits...) - #{ commit [ 'author' ] [ 'name' ] } (#{ compare_url } )"
32
+ url = payload [ 'repository' ] [ 'url' ] + "/compare/#{ before } ...#{ after } "
30
33
else
31
- commits . each do |commit |
32
- room . speak "[#{ repository } /#{ branch } ] #{ commit [ 'message' ] } - #{ commit [ 'author' ] [ 'name' ] } (#{ commit [ 'url' ] } )"
33
- end
34
+ url = commit [ 'url' ]
34
35
end
36
+
37
+ room . paste message
38
+ room . speak url
35
39
room . play "rimshot" if play_sound
36
40
37
41
room . leave
You can’t perform that action at this time.
0 commit comments