修复: journal来源解析
This commit is contained in:
		
							parent
							
								
									12c020f315
								
							
						
					
					
						commit
						a3ee98125b
					
				| 
						 | 
				
			
			@ -88,7 +88,7 @@ class Journal < ApplicationRecord
 | 
			
		|||
    if self.operate_by.starts_with?("Project#")
 | 
			
		||||
      project_id, commit_sha = self.operate_by.scan(/#(\d+).*?@(\w+)/)[0]
 | 
			
		||||
      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
 | 
			
		||||
  rescue 
 | 
			
		||||
    return ''
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue