mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
* api/v1/repos/{owner}/{repo}/pulls/{number}/commits
* api/v1/repos/{owner}/{repo}/pulls/{number}/files
* api/v1/repos/{owner}/{repo}/compare/{base}...{head}
14 lines
484 B
Ruby
14 lines
484 B
Ruby
json.author do
|
|
author = User.find_by(login: commit['Author']['Name'])
|
|
json.partial! 'repositories/commit_author', locals: { user: author }
|
|
end
|
|
|
|
json.committer do
|
|
author = User.find_by(login: commit['Committer']['Name'])
|
|
json.partial! 'repositories/commit_author', locals: { user: author }
|
|
end
|
|
json.timestamp render_unix_time(commit['Committer']['When'])
|
|
json.time_from_now time_from_now(commit['Committer']['When'])
|
|
json.message commit['CommitMessage']
|
|
json.sha commit['Sha']
|