Remove WOODPECKER_DEV_OAUTH_HOST and WOODPECKER_DEV_GITEA_OAUTH_URL (#3961)

Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
This commit is contained in:
6543
2024-07-23 14:25:39 +02:00
committed by GitHub
parent 3a4ffe951e
commit 659e925d0e
3 changed files with 3 additions and 15 deletions

View File

@@ -378,7 +378,7 @@ var flags = append([]cli.Flag{
"WOODPECKER_BITBUCKET_SKIP_VERIFY"),
},
&cli.StringFlag{
Sources: cli.EnvVars("WOODPECKER_EXPERT_FORGE_OAUTH_HOST", "WOODPECKER_DEV_GITEA_OAUTH_URL"), // TODO: remove WOODPECKER_DEV_GITEA_OAUTH_URL in next major release
Sources: cli.EnvVars("WOODPECKER_EXPERT_FORGE_OAUTH_HOST"),
Name: "forge-oauth-host",
Usage: "!!!for experts!!! fully qualified public forge url. Use it if your forge url WOODPECKER_FORGE_URL or WOODPECKER_GITEA_URL, ... isn't a public url. Format: <scheme>://<host>[/<prefix path>]",
},
@@ -481,14 +481,6 @@ var flags = append([]cli.Flag{
Name: "server-webhook-host",
Usage: "!!!for experts!!! fully qualified woodpecker server url called by forge's webhooks. Format: <scheme>://<host>[/<prefix path>]",
},
// TODO: remove in next major release
&cli.StringFlag{
Sources: cli.EnvVars("WOODPECKER_DEV_OAUTH_HOST"),
Name: "server-dev-oauth-host-deprecated",
Usage: "DEPRECATED: use WOODPECKER_EXPERT_FORGE_OAUTH_HOST instead\nfully qualified url used for oauth redirects. Format: <scheme>://<host>[/<prefix path>]",
Value: "",
Hidden: true,
},
//
// secrets encryption in DB
//

View File

@@ -206,11 +206,7 @@ func setupEvilGlobals(ctx context.Context, c *cli.Command, s store.Store) error
} else {
server.Config.Server.WebhookHost = serverHost
}
if c.IsSet("server-dev-oauth-host-deprecated") {
server.Config.Server.OAuthHost = c.String("server-dev-oauth-host-deprecated")
} else {
server.Config.Server.OAuthHost = serverHost
}
server.Config.Server.OAuthHost = serverHost
server.Config.Server.Port = c.String("server-addr")
server.Config.Server.PortTLS = c.String("server-addr-tls")
server.Config.Server.StatusContext = c.String("status-context")