query and show commits by branch

This allows the same SHA to have different builds on different branches, each
separately viewable. This is useful for expressing a "pipeline" in terms of
branches, e.g. a commit starts on branch A and progress through B and C to
master, with the build script switching on branch name.

Previously viewing each build would arbitrarily choose which branch's commit
to show.
This commit is contained in:
Alex Suraci
2014-03-14 11:34:43 -07:00
parent 2241b5bb81
commit 2d837cc3db
14 changed files with 85 additions and 31 deletions

View File

@@ -205,9 +205,9 @@ func setupHandlers() {
m.Post("/install", handler.ErrorHandler(handler.InstallPost))
// handlers for repository, commits and build details
m.Get("/:host/:owner/:name/commit/:commit/build/:label/out.txt", handler.RepoHandler(handler.BuildOut))
m.Get("/:host/:owner/:name/commit/:commit/build/:label", handler.RepoHandler(handler.CommitShow))
m.Get("/:host/:owner/:name/commit/:commit", handler.RepoHandler(handler.CommitShow))
m.Get("/:host/:owner/:name/commit/:branch/:commit/build/:label/out.txt", handler.RepoHandler(handler.BuildOut))
m.Get("/:host/:owner/:name/commit/:branch/:commit/build/:label", handler.RepoHandler(handler.CommitShow))
m.Get("/:host/:owner/:name/commit/:branch/:commit", handler.RepoHandler(handler.CommitShow))
m.Get("/:host/:owner/:name/tree", handler.RepoHandler(handler.RepoDashboard))
m.Get("/:host/:owner/:name/status.png", handler.ErrorHandler(handler.Badge))
m.Get("/:host/:owner/:name/settings", handler.RepoAdminHandler(handler.RepoSettingsForm))