Use "-gitea-url" instead of "-gitea-host" or simiar

This allows to use another schema than https:// to connect to Gitea
This commit is contained in:
2025-04-07 14:20:26 +02:00
parent 5ea5f05b02
commit d3f1b36676
5 changed files with 21 additions and 15 deletions

View File

@@ -490,7 +490,7 @@ func updateConfiguration(configFilename string, orgs *[]string) {
func main() {
configFilename := flag.String("config", "", "List of PrjGit")
giteaHost := flag.String("gitea", "src.opensuse.org", "Gitea instance")
giteaUrl := flag.String("gitea-url", "https://src.opensuse.org", "Gitea instance")
rabbitUrl := flag.String("url", "amqps://rabbit.opensuse.org", "URL for RabbitMQ instance")
flag.BoolVar(&DebugMode, "debug", false, "Extra debugging information")
flag.BoolVar(&checkOnStart, "check-on-start", false, "Check all repositories for consistency on start, without delays")
@@ -530,7 +530,7 @@ func main() {
checkInterval = time.Duration(*checkIntervalHours) * time.Hour
gitea = common.AllocateGiteaTransport(*giteaHost)
gitea = common.AllocateGiteaTransport(*giteaUrl)
CurrentUser, err := gitea.GetCurrentUser()
if err != nil {
log.Fatalln("Cannot fetch current user:", err)