29 lines
564 B
Go
29 lines
564 B
Go
package main
|
|
|
|
import (
|
|
"src.opensuse.org/autogits/common"
|
|
)
|
|
|
|
const (
|
|
GitAuthor = "GiteaBot - Obs Staging"
|
|
ObsBuildBot = "/obsbuild"
|
|
)
|
|
|
|
var GiteaToken string
|
|
|
|
|
|
func main() {
|
|
var defs common.ListenDefinitions
|
|
|
|
defs.Url = ObsBuildBot
|
|
defs.GitAuthor = GitAuthor
|
|
|
|
defs.Handlers = make(map[string]common.RequestProcessor)
|
|
defs.Handlers[common.RequestType_PR] = processPullRequest
|
|
defs.Handlers[common.RequestType_PR_sync] = processPullRequest
|
|
|
|
common.RequireGiteaSecretToken()
|
|
common.RequireObsSecretToken()
|
|
common.StartServerWithAddress(defs, ListenAddr)
|
|
}
|