forked from Gitlink/forgeplus
change commits committer
This commit is contained in:
parent
858ead3464
commit
fa17a2eb7f
|
@ -96,7 +96,7 @@ class User < ApplicationRecord
|
|||
where("LOWER(concat(lastname, firstname, login, mail)) LIKE ?", "%#{keywords.split(" ").join('|')}%") unless keywords.blank?
|
||||
}
|
||||
|
||||
scope :simple_select, -> {select(:id, :login, :lastname,:firstname, :nickname)}
|
||||
scope :simple_select, -> {select(:id, :login, :lastname,:firstname, :nickname, :gitea_uid)}
|
||||
|
||||
attr_accessor :password, :password_confirmation
|
||||
|
||||
|
|
|
@ -5,11 +5,10 @@ else
|
|||
json.total_count @hash_commit[:total_count]
|
||||
json.commits do
|
||||
json.array! @hash_commit[:body] do |commit|
|
||||
Rails.logger.info("#######______commit______#########{commit}")
|
||||
commiter = commit['committer']
|
||||
if commiter.present?
|
||||
commit_user = commiter['name']
|
||||
forge_user = User.simple_select.find_by(login: commit_user)
|
||||
commit_user_id = commiter['id']
|
||||
forge_user = User.simple_select.find_by(gitea_uid: commit_user_id)
|
||||
end
|
||||
json.sha commit['sha']
|
||||
json.message commit['commit']['message']
|
||||
|
|
Loading…
Reference in New Issue