Cirno the Strongest
32b8172e56
Consolidate API for getting single commit ( #11368 )
...
* Allow Git ref for /repos/{owner}/{repo}/git/commits/{sha}
* Consolidate API for getting single commit
* Fix tests and do it differently
Co-authored-by: zeripath <art27@cantab.net>
5 years ago
6543
3d63caa542
[API] Get a single commit via Ref ( #10915 )
...
* GET /repos/:owner/:repo/commits/:ref
* add Validation Checks
* Fix & Extend TEST
* add two new tast cases
5 years ago
SpaWn2KiLl
1f01f53c53
API add/generalize pagination ( #9452 )
...
* paginate results
* fixed deadlock
* prevented breaking change
* updated swagger
* go fmt
* fixed find topic
* go mod tidy
* go mod vendor with go1.13.5
* fixed repo find topics
* fixed unit test
* added Limit method to Engine struct; use engine variable when provided; fixed gitignore
* use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors
* set Page value on Home route
* improved memory allocations
* fixed response headers
* removed logfiles
* fixed import order
* import order
* improved swagger
* added function to get models.ListOptions from context
* removed pagesize diff on unit test
* fixed imports
* removed unnecessary struct field
* fixed go fmt
* scoped PR
* code improvements
* code improvements
* go mod tidy
* fixed import order
* fixed commit statuses session
* fixed files headers
* fixed headers; added pagination for notifications
* go mod tidy
* go fmt
* removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list
* Apply suggestions from code review
Co-Authored-By: 6543 <6543@obermui.de>
Co-Authored-By: zeripath <art27@cantab.net>
* fixed build error
* CI.restart()
* fixed merge conflicts resolve
* fixed conflicts resolve
* improved FindTrackedTimesOptions.ToOptions() method
* added backwards compatibility on ListReleases request; fixed issue tracked time ToSession
* fixed build error; fixed swagger template
* fixed swagger template
* fixed ListReleases backwards compatibility
* added page to user search route
Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: zeripath <art27@cantab.net>
5 years ago
6543
2848c5eb8f
Swagger info corrections ( #9441 )
...
* use numbers and not http.Status___ enum
* fix test
* add many missing swagger responses
* code format
* Deletion Sould return 204 ...
* error handling improvements
* if special error type ... then add it to swagger too
* one smal nit
* invalidTopicsError is []string
* valid swagger specification 2.0
- if you add responses swagger can tell you if you do it right 👍
* use ctx.InternalServerError
* Revert "use numbers and not http.Status___ enum"
This reverts commit b1ff386e2418ed6a7f183e756b13277d701278ef.
* use http.Status* enum everywhere
5 years ago
zeripath
722a7c902d
Add Close() method to gogitRepository ( #8901 )
...
In investigating #7947 it has become clear that the storage component of go-git repositories needs closing.
This PR adds this Close function and adds the Close functions as necessary.
In TransferOwnership the ctx.Repo.GitRepo is closed if it is open to help prevent the risk of multiple open files.
Fixes #7947
5 years ago
Mike Schwörer
042089fbaf
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
5 years ago
Richard Mahn
26b493bb26
Fixes #7564 - Malformed URLs in API git/commits response ( #7565 )
5 years ago
Lunny Xiao
34eee25bd4
Move sdk structs to modules/structs ( #6905 )
...
* move sdk structs to moduels/structs
* fix tests
* fix fmt
* fix swagger
* fix vendor
6 years ago
John Olheiser
cb64b21a7f
Change summary to full message ( #6591 )
...
Signed-off-by: jolheiser <john.olheiser@gmail.com>
6 years ago
Lunny Xiao
d578b71d61
move code.gitea.io/git to code.gitea.io/gitea/modules/git ( #6364 )
...
* move code.gitea.io/git to code.gitea.io/gitea/modules/git
* fix imports
* fix fmt
* fix misspell
* remove wrong tests data
* fix unit tests
* fix tests
* fix tests
* fix tests
* fix tests
* fix tests
* enable Debug to trace the failure tests
* fix tests
* fix tests
* fix tests
* fix tests
* fix tests
* comment commit count tests since git clone depth is 50
* fix tests
* update from code.gitea.io/git
* revert change to makefile
6 years ago
Richard Mahn
ecce28f9df
Updates SDK dep ( #6406 )
6 years ago
Lunny Xiao
ecefa9e724
Add single commit API support ( #5843 )
...
* add single commit API support
6 years ago