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>
This commit is contained in:

committed by
GitHub

parent
59b9b77a0d
commit
32b8172e56
@ -817,14 +817,13 @@ func RegisterRoutes(m *macaron.Macaron) {
|
||||
m.Group("/commits", func() {
|
||||
m.Get("", repo.GetAllCommits)
|
||||
m.Group("/:ref", func() {
|
||||
m.Get("", repo.GetSingleCommitByRef)
|
||||
m.Get("/status", repo.GetCombinedCommitStatusByRef)
|
||||
m.Get("/statuses", repo.GetCommitStatusesByRef)
|
||||
})
|
||||
}, reqRepoReader(models.UnitTypeCode))
|
||||
m.Group("/git", func() {
|
||||
m.Group("/commits", func() {
|
||||
m.Get("/:sha", repo.GetSingleCommitBySHA)
|
||||
m.Get("/:sha", repo.GetSingleCommit)
|
||||
})
|
||||
m.Get("/refs", repo.GetGitAllRefs)
|
||||
m.Get("/refs/*", repo.GetGitRefs)
|
||||
|
Reference in New Issue
Block a user