mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 00:20:25 +08:00 
			
		
		
		
	API method to list all commits of a repository (#6408)
* Added API endpoint ListAllCommits (/repos/{owner}/{repo}/git/commits)
Signed-off-by: Mike Schwörer <mailport@mikescher.de>
* Fixed failing drone build
Signed-off-by: Mike Schwörer <mailport@mikescher.de>
* Implemented requested changes (PR reviews)
Signed-off-by: Mike Schwörer <mailport@mikescher.de>
* gofmt
Signed-off-by: Mike Schwörer <mailport@mikescher.de>
* Changed api route from "/repos/{owner}/{repo}/git/commits" to "/repos/{owner}/{repo}/commits"
* Removed unnecessary line
* better error message when git repo is empty
* make generate-swagger
* fixed removed return
* Update routers/api/v1/repo/commits.go
Co-Authored-By: Lauris BH <lauris@nix.lv>
* Update routers/api/v1/repo/commits.go
Co-Authored-By: Lauris BH <lauris@nix.lv>
* go fmt
* Refactored common code into ToCommit()
* made toCommit not exported
* added check for userCache == nil
			
			
This commit is contained in:
		
				
					committed by
					
						
						Antoine GIRARD
					
				
			
			
				
	
			
			
			
						parent
						
							6b3f52fe5f
						
					
				
				
					commit
					042089fbaf
				
			@@ -44,3 +44,9 @@ type MarkdownRender string
 | 
			
		||||
type ServerVersion struct {
 | 
			
		||||
	Version string `json:"version"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// APIError is an api error with a message
 | 
			
		||||
type APIError struct {
 | 
			
		||||
	Message string `json:"message"`
 | 
			
		||||
	URL     string `json:"url"`
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user