autogits/obs-staging-bot/main.go

42 lines
573 B
Go
Raw Normal View History

2024-07-07 21:08:41 +02:00
package main
import (
2024-07-16 22:05:44 +02:00
"time"
2024-07-07 21:08:41 +02:00
"src.opensuse.org/autogits/common"
2024-07-16 22:05:44 +02:00
"github.com/rabbitmq/amqp091-go"
2024-07-07 21:08:41 +02:00
)
const (
GitAuthor = "GiteaBot - Obs Staging"
2024-07-16 17:05:43 +02:00
ObsBuildBot = "/obsbuild"
2024-07-07 21:08:41 +02:00
)
var GiteaToken string
2024-07-16 22:05:44 +02:00
var runId uint
2024-07-07 21:08:41 +02:00
2024-07-16 22:05:44 +02:00
func allocateRequestHandler() *common.RequestHandler {
runId++
return &common.RequestHandler {
Logger: &common.StdoutLogging{
Id: runId,
Date: time.Now(),
},
}
}
2024-07-07 21:08:41 +02:00
2024-07-16 17:05:43 +02:00
func main() {
var defs common.ListenDefinitions
2024-07-07 21:08:41 +02:00
2024-07-16 17:05:43 +02:00
defs.Url = ObsBuildBot
defs.GitAuthor = GitAuthor
2024-07-07 21:08:41 +02:00
2024-07-16 17:05:43 +02:00
common.RequireGiteaSecretToken()
common.RequireObsSecretToken()
2024-07-16 22:05:44 +02:00
2024-07-07 21:08:41 +02:00
}