mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
UX: Use committed date for GitHub oneboxes (#16318)
Our copy says 'committed {date}`, but we were previously using the commit's authored date
This commit is contained in:
@ -35,7 +35,7 @@ module Onebox
|
||||
result['title'] = lines.first
|
||||
result['body'], result['excerpt'] = compute_body(lines[1..lines.length].join("\n"))
|
||||
|
||||
committed_at = Time.parse(result['commit']['author']['date'])
|
||||
committed_at = Time.parse(result['commit']['committer']['date'])
|
||||
result['committed_at'] = committed_at.strftime("%I:%M%p - %d %b %y %Z")
|
||||
result['committed_at_date'] = committed_at.strftime("%F")
|
||||
result['committed_at_time'] = committed_at.strftime("%T")
|
||||
|
Reference in New Issue
Block a user