lib/onebox/engine/github_commit_onebox.rb in onebox-1.5.10 vs lib/onebox/engine/github_commit_onebox.rb in onebox-1.5.11

- old
+ new

@@ -18,10 +18,15 @@ end def data result = raw.clone result['link'] = link - result['title'] = result['commit']['message'] + result['title'] = result['commit']['message'].split("\n").first + + if result['commit']['message'].lines.count > 1 + result['message'] = result['commit']['message'].split("\n", 2).last.strip + end + result['commit_date'] = Time.parse(result['commit']['author']['date']).strftime("%I:%M%p - %d %b %y") result end end end