mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Fix ref to trigger Actions (#22679)
If triggered by PR, the ref should be `pull/<index>/head` instead of `repo.DefaultBranch`. And improve UI: <img width="493" alt="image" src="https://user-images.githubusercontent.com/9418365/215731280-312564f2-2450-45d0-b986-1accb0670976.png"> Related to #21937.
This commit is contained in:
		@@ -7,8 +7,15 @@
 | 
			
		||||
			<div class="issue-item-main f1 fc df">
 | 
			
		||||
				<div class="issue-item-top-row">
 | 
			
		||||
					<a class="index ml-0 mr-2" href="{{if .HTMLURL}}{{.HTMLURL}}{{else}}{{$.Link}}/{{.Index}}{{end}}">
 | 
			
		||||
						{{.Title}} <span class="ui label">{{RefShortName .Ref}}</span>
 | 
			
		||||
						{{.Title}}
 | 
			
		||||
					</a>
 | 
			
		||||
					<span class="ui label">
 | 
			
		||||
						{{if .RefLink}}
 | 
			
		||||
							<a href="{{.RefLink}}">{{.PrettyRef}}</a>
 | 
			
		||||
						{{else}}
 | 
			
		||||
							{{.PrettyRef}}
 | 
			
		||||
						{{end}}
 | 
			
		||||
					</span>
 | 
			
		||||
				</div>
 | 
			
		||||
				<div class="desc issue-item-bottom-row df ac fw my-1">
 | 
			
		||||
					<b>{{if not $.CurWorkflow}}{{.WorkflowID}} {{end}}#{{.Index}}</b>: {{$.locale.Tr "actions.runs.commit"}}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user