Fix URL link in Bitbucket status
This commit is contained in:
		
							parent
							
								
									3735ce43fc
								
							
						
					
					
						commit
						8377057364
					
				|  | @ -52,7 +52,7 @@ | ||||||
|       - @repos.each do |repo| |       - @repos.each do |repo| | ||||||
|         %tr{ id: "repo_#{repo.owner}___#{repo.slug}" } |         %tr{ id: "repo_#{repo.owner}___#{repo.slug}" } | ||||||
|           %td |           %td | ||||||
|             = link_to repo.full_name, "https://bitbucket.org/#{repo.full_name}", target: '_blank', rel: 'noopener noreferrer' |             = link_to repo.full_name, repo.browse_url, target: '_blank', rel: 'noopener noreferrer' | ||||||
|           %td.import-target |           %td.import-target | ||||||
|             %fieldset.row |             %fieldset.row | ||||||
|             .input-group |             .input-group | ||||||
|  |  | ||||||
|  | @ -13,6 +13,10 @@ module BitbucketServer | ||||||
|         raw['slug'] |         raw['slug'] | ||||||
|       end |       end | ||||||
| 
 | 
 | ||||||
|  |       def browse_url | ||||||
|  |         link = raw.dig('project', 'links', 'self').first.fetch('href') | ||||||
|  |       end | ||||||
|  | 
 | ||||||
|       def clone_url |       def clone_url | ||||||
|         raw['links']['clone'].find { |link| link['name'].starts_with?('http') }.fetch('href') |         raw['links']['clone'].find { |link| link['name'].starts_with?('http') }.fetch('href') | ||||||
|       end |       end | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue