Stub for gitlab integration

This commit is contained in:
Nurahmadie 2014-03-27 18:19:36 +07:00
parent 6e2b74eac7
commit deb2c79c2f
2 changed files with 9 additions and 0 deletions

View file

@ -42,6 +42,7 @@ deps:
#go get github.com/dotcloud/docker/pkg/term
go get github.com/drone/go-github/github
go get github.com/drone/go-bitbucket/bitbucket
go get github.com/plouc/go-gitlab-client
go get github.com/GeertJohan/go.rice
go get github.com/GeertJohan/go.rice/rice
go get github.com/go-sql-driver/mysql

View file

@ -16,6 +16,7 @@ import (
"github.com/drone/drone/pkg/channel"
"github.com/drone/drone/pkg/database"
"github.com/drone/drone/pkg/handler"
"github.com/drone/drone/pkg/handler/gitlab"
"github.com/drone/drone/pkg/queue"
)
@ -135,6 +136,10 @@ func setupHandlers() {
m.Post("/new/github.com", handler.UserHandler(handler.RepoCreateGithub))
m.Get("/new/github.com", handler.UserHandler(handler.RepoAdd))
// handlers for setting up your GitLab repository
m.Post("/new/gitlab", handler.UserHandler(gitlab.RepoCreate))
m.Get("/new/gitlab", handler.UserHandler(gitlab.RepoAdd))
// handlers for linking your GitHub account
m.Get("/auth/login/github", handler.UserHandler(handler.LinkGithub))
@ -178,6 +183,9 @@ func setupHandlers() {
// handlers for GitHub post-commit hooks
m.Post("/hook/github.com", handler.ErrorHandler(hookHandler.Hook))
// handlers for GitLab post-commit hooks
m.Post("/hook/gitlab", handler.ErrorHandler(gitlab.Hook))
// handlers for first-time installation
m.Get("/install", handler.ErrorHandler(handler.Install))
m.Post("/install", handler.ErrorHandler(handler.InstallPost))