It is possible to create draft releases prior to creating a tag. This will cause a 500 on the releases page due to compare page failing. This PR only shows the compare button if there is a SHA1 present. Fix #16610 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv>
This commit is contained in:
		
							parent
							
								
									619e6d6400
								
							
						
					
					
						commit
						20601f8463
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		|  | @ -82,8 +82,10 @@ | ||||||
| 									<a class="mono" href="{{$.RepoLink}}/src/commit/{{.Sha1}}" rel="nofollow">{{svg "octicon-git-commit" 16 "mr-2"}}{{ShortSha .Sha1}}</a> | 									<a class="mono" href="{{$.RepoLink}}/src/commit/{{.Sha1}}" rel="nofollow">{{svg "octicon-git-commit" 16 "mr-2"}}{{ShortSha .Sha1}}</a> | ||||||
| 								</span> | 								</span> | ||||||
| 							{{end}} | 							{{end}} | ||||||
|  | 							{{if .Sha1 }} | ||||||
| 								{{template "repo/branch_dropdown" dict "root" $ "release" .}} | 								{{template "repo/branch_dropdown" dict "root" $ "release" .}} | ||||||
| 							{{end}} | 							{{end}} | ||||||
|  | 						{{end}} | ||||||
| 					</div> | 					</div> | ||||||
| 					<div class="ui twelve wide column detail"> | 					<div class="ui twelve wide column detail"> | ||||||
| 						{{if .IsTag}} | 						{{if .IsTag}} | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue