mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	Use complete SHA to create and query commit status (#22244)
Fix #13485. Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
		@@ -166,7 +166,7 @@ func createTemporaryRepo(ctx context.Context, pr *issues_model.PullRequest) (str
 | 
			
		||||
	var headBranch string
 | 
			
		||||
	if pr.Flow == issues_model.PullRequestFlowGithub {
 | 
			
		||||
		headBranch = git.BranchPrefix + pr.HeadBranch
 | 
			
		||||
	} else if len(pr.HeadCommitID) == 40 { // for not created pull request
 | 
			
		||||
	} else if len(pr.HeadCommitID) == git.SHAFullLength { // for not created pull request
 | 
			
		||||
		headBranch = pr.HeadCommitID
 | 
			
		||||
	} else {
 | 
			
		||||
		headBranch = pr.GetGitRefName()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user