mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-03 21:08:25 +00:00 
			
		
		
		
	fix release creation via API (#5076)
* fix release creation via API * fix release create tests
This commit is contained in:
		@@ -115,9 +115,9 @@ func createTag(gitRepo *git.Repository, rel *Release) error {
 | 
			
		||||
	// Only actual create when publish.
 | 
			
		||||
	if !rel.IsDraft {
 | 
			
		||||
		if !gitRepo.IsTagExist(rel.TagName) {
 | 
			
		||||
			commit, err := gitRepo.GetBranchCommit(rel.Target)
 | 
			
		||||
			commit, err := gitRepo.GetCommit(rel.Target)
 | 
			
		||||
			if err != nil {
 | 
			
		||||
				return fmt.Errorf("GetBranchCommit: %v", err)
 | 
			
		||||
				return fmt.Errorf("GetCommit: %v", err)
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			// Trim '--' prefix to prevent command line argument vulnerability.
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user