package main import ( "src.opensuse.org/autogits/common" ) const ( ListenPort = 8001 ListenAddr = "[::1]" GitAuthor = "GiteaBot - AutoStaging" PrReview = "pr-review" ) func processPullRequest(h *common.RequestHandler) error { req := h.Data.(common.PullRequestAction) // requests against project are not handled here if req.Repository.Name == common.DefaultGitPrj { return nil } return nil } func main() { var defs common.ListenDefinitions defs.Url = PrReview defs.GitAuthor = GitAuthor defs.Handlers=make(map[string]common.RequestProcessor) defs.Handlers[common.RequestType_PR] = processPullRequest common.RequireGiteaSecretToken() common.RequireObsSecretToken() common.StartServer(defs) }