Browse Source

新增:时间返回

pull/347/head
yystopf 2 years ago
parent
commit
90fa4774d8
2 changed files with 2 additions and 0 deletions
  1. +1
    -0
      app/views/pull_requests/index.json.jbuilder
  2. +1
    -0
      app/views/repositories/tags.json.jbuilder

+ 1
- 0
app/views/pull_requests/index.json.jbuilder View File

@@ -32,6 +32,7 @@ json.issues do
json.id issue.id
json.name issue.subject
json.pr_time time_from_now(pr.status == 1 ? pr.updated_at : issue.updated_on)
json.pr_full_time pr.status == 1 ? pr.updated_at : issue.updated_on
json.assign_user_name issue.get_assign_user.try(:show_real_name)
json.assign_user_login issue.get_assign_user.try(:login)
json.author_name issue.user.try(:show_real_name)


+ 1
- 0
app/views/repositories/tags.json.jbuilder View File

@@ -10,6 +10,7 @@ json.tags @tags do |tag|
end
json.time_ago time_from_now(tag['tagger']['date'].to_time)
json.created_at_unix tag['tagger']['date'].to_time.to_i
json.created_time tag['tagger']['date'].to_time
json.message tag['message']
json.commit do
json.sha tag['commit']['sha']


Loading…
Cancel
Save