diff options
author | Kim "BKC" Carlbäcker <kim.carlbacker@gmail.com> | 2017-04-21 13:32:31 +0200 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-04-21 19:32:31 +0800 |
commit | 4bea2191286dd5a9c89696d3e8cd506caf997c7e (patch) | |
tree | 4f720881614581ccfa656a9f61d1a89313e05ceb /routers/api/v1/api.go | |
parent | 52627032bc55bd73694bea9e6e17df575b51664c (diff) | |
download | gitea-4bea2191286dd5a9c89696d3e8cd506caf997c7e.tar.gz gitea-4bea2191286dd5a9c89696d3e8cd506caf997c7e.zip |
Status-API (#1332)
Diffstat (limited to 'routers/api/v1/api.go')
-rw-r--r-- | routers/api/v1/api.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index 74aa995c97..e33dc12d28 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -412,6 +412,13 @@ func RegisterRoutes(m *macaron.Macaron) { }) }, mustAllowPulls, context.ReferencesGitRepo()) + m.Group("/statuses", func() { + m.Combo("/:sha").Get(repo.GetCommitStatuses).Post(reqRepoWriter(), bind(api.CreateStatusOption{}), repo.NewCommitStatus) + }) + m.Group("/commits/:ref", func() { + m.Get("/status", repo.GetCombinedCommitStatus) + m.Get("/statuses", repo.GetCommitStatuses) + }) }, repoAssignment()) }, reqToken()) |