fix: commit author and fork create units
This commit is contained in:
parent
6ce4b26047
commit
c175fa1339
|
@ -24,6 +24,8 @@ class Projects::ForkService < ApplicationService
|
|||
new_repository.identifier = @project.identifier
|
||||
new_repository.save!
|
||||
|
||||
ProjectUnit.init_types(clone_project.id)
|
||||
|
||||
result = Gitea::Repository::ForkService.new(@project.owner, @target_owner, @project.identifier, @organization).call
|
||||
|
||||
@project.update_column('forked_count', @project&.forked_count.to_i + 1)
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
json.author do
|
||||
author = User.find_by(login: commit['Author']['Name'])
|
||||
json.partial! 'repositories/commit_author', locals: { user: author }
|
||||
json.partial! 'repositories/commit_author', locals: { user: author, name: commit['Committer']['Name'] }
|
||||
end
|
||||
|
||||
json.committer do
|
||||
author = User.find_by(login: commit['Committer']['Name'])
|
||||
json.partial! 'repositories/commit_author', locals: { user: author }
|
||||
json.partial! 'repositories/commit_author', locals: { user: author, name: commit['Committer']['Name'] }
|
||||
end
|
||||
json.timestamp render_unix_time(commit['Committer']['When'])
|
||||
json.time_from_now time_from_now(commit['Committer']['When'])
|
||||
|
|
Loading…
Reference in New Issue