mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 19:06:18 +01:00 
			
		
		
		
	api: fix multiple bugs with statuses endpoints (#7785)
* fix commit statuses api url * search refs before passing sha * adjust tests * directly search tags and branches names + remove un-needed check in NewCommitStatus * fix comment * de-duplicate code * test: use relative setting.AppURL * Update routers/api/v1/repo/status.go Co-Authored-By: Lauris BH <lauris@nix.lv> * remove return * Update routers/api/v1/repo/status.go Co-Authored-By: Lauris BH <lauris@nix.lv>
This commit is contained in:
		
				
					committed by
					
						 Lunny Xiao
						Lunny Xiao
					
				
			
			
				
	
			
			
			
						parent
						
							c534b7e211
						
					
				
				
					commit
					2b6f45299d
				
			| @@ -89,7 +89,7 @@ func (status *CommitStatus) loadRepo(e Engine) (err error) { | ||||
| // APIURL returns the absolute APIURL to this commit-status. | ||||
| func (status *CommitStatus) APIURL() string { | ||||
| 	_ = status.loadRepo(x) | ||||
| 	return fmt.Sprintf("%sapi/v1/%s/statuses/%s", | ||||
| 	return fmt.Sprintf("%sapi/v1/repos/%s/statuses/%s", | ||||
| 		setting.AppURL, status.Repo.FullName(), status.SHA) | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user