From 3d63caa54245d87dd057d4e853bb5dc7fc39e7db Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Wed, 8 Apr 2020 04:54:46 +0200 Subject: [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 --- routers/api/v1/api.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'routers/api/v1/api.go') diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index e5bb98033b..8fc1eeefd1 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -798,14 +798,14 @@ func RegisterRoutes(m *macaron.Macaron) { m.Group("/commits", func() { m.Get("", repo.GetAllCommits) m.Group("/:ref", func() { - // TODO: Add m.Get("") for single commit (https://developer.github.com/v3/repos/commits/#get-a-single-commit) + 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.GetSingleCommit) + m.Get("/:sha", repo.GetSingleCommitBySHA) }) m.Get("/refs", repo.GetGitAllRefs) m.Get("/refs/*", repo.GetGitRefs) -- cgit v1.2.3