diff options
author | Mike Schwörer <mailport@mikescher.de> | 2019-08-26 16:09:10 +0200 |
---|---|---|
committer | Antoine GIRARD <sapk@users.noreply.github.com> | 2019-08-26 16:09:10 +0200 |
commit | 042089fbaf8a818042405a75bee08dea8db347c0 (patch) | |
tree | 5f5692b5e29a4cf8ab5b2c03a735506073317480 /modules/structs | |
parent | 6b3f52fe5f7db5b3122cc8481ab8fed83e273fde (diff) | |
download | gitea-042089fbaf8a818042405a75bee08dea8db347c0.tar.gz gitea-042089fbaf8a818042405a75bee08dea8db347c0.zip |
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
Diffstat (limited to 'modules/structs')
-rw-r--r-- | modules/structs/miscellaneous.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/structs/miscellaneous.go b/modules/structs/miscellaneous.go index 8eca90330e..c21c466cb0 100644 --- a/modules/structs/miscellaneous.go +++ b/modules/structs/miscellaneous.go @@ -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"` +} |