|
|
@@ -88,7 +88,7 @@ class Journal < ApplicationRecord |
|
|
if self.operate_by.starts_with?("Project#") |
|
|
if self.operate_by.starts_with?("Project#") |
|
|
project_id, commit_sha = self.operate_by.scan(/#(\d+).*?@(\w+)/)[0] |
|
|
project_id, commit_sha = self.operate_by.scan(/#(\d+).*?@(\w+)/)[0] |
|
|
project =Project.find_by_id(project_id) |
|
|
project =Project.find_by_id(project_id) |
|
|
return "通过<a =\"#{Rails.application.config_for(:configuration)['platform_url']}/#{project&.owner&.login}/#{project&.identifier}/commits/#{commit_sha}\">#{project&.owner&.real_name}/#{project&.name} 提交 #{commit_sha[0...10]}</a>" |
|
|
|
|
|
|
|
|
return "通过<a href=\"#{Rails.application.config_for(:configuration)['platform_url']}/#{project&.owner&.login}/#{project&.identifier}/commits/#{commit_sha}\">#{project&.owner&.real_name}/#{project&.name} 提交 #{commit_sha[0...10]}</a>" |
|
|
end |
|
|
end |
|
|
rescue |
|
|
rescue |
|
|
return '' |
|
|
return '' |
|
|
|