Add single commit API support (#5843)

* add single commit API support
This commit is contained in:
Lunny Xiao 2019-02-03 11:35:17 +08:00 committed by techknowlogick
parent 3d91bb2f2d
commit ecefa9e724
10 changed files with 389 additions and 11 deletions

View file

@ -617,6 +617,9 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Get("/statuses", repo.GetCommitStatusesByRef)
}, reqRepoReader(models.UnitTypeCode))
m.Group("/git", func() {
m.Group("/commits", func() {
m.Get("/:sha", repo.GetSingleCommit)
})
m.Get("/refs", repo.GetGitAllRefs)
m.Get("/refs/*", repo.GetGitRefs)
m.Combo("/trees/:sha", context.RepoRef()).Get(repo.GetTree)