fix(ci): restore *vcsURL default in --gitea-url alias registration
PR Ready Gate / clear-labels (pull_request) Successful in 1s
CI / test (pull_request) Successful in 20s
CI / review (anthropic--claude-4.6-sonnet, sonnet, SONNET_REVIEW_TOKEN) (pull_request) Successful in 45s
CI / review (gpt-5, security, ., rodin/security-patterns, SECURITY_REVIEW.md, SECURITY_REVIEW_TOKEN) (pull_request) Successful in 1m49s
CI / review (gpt-5, gpt, GPT_REVIEW_TOKEN) (pull_request) Successful in 2m3s
PR Ready Gate / clear-labels (pull_request) Successful in 1s
CI / test (pull_request) Successful in 20s
CI / review (anthropic--claude-4.6-sonnet, sonnet, SONNET_REVIEW_TOKEN) (pull_request) Successful in 45s
CI / review (gpt-5, security, ., rodin/security-patterns, SECURITY_REVIEW.md, SECURITY_REVIEW_TOKEN) (pull_request) Successful in 1m49s
CI / review (gpt-5, gpt, GPT_REVIEW_TOKEN) (pull_request) Successful in 2m3s
flag.StringVar sets *p = value at registration time. Using "" as the default overwrites the env-resolved value that --vcs-url already stored in *vcsURL. Restore *vcsURL as the default to preserve the GITEA_URL / VCS_URL / GITHUB_SERVER_URL resolution chain. Fixes CI error: --vcs-url (or --gitea-url) is required for provider=gitea
This commit is contained in:
@@ -85,8 +85,9 @@ func main() {
|
|||||||
aicoreResourceGroup := flag.String("aicore-resource-group", envOrDefault("AICORE_RESOURCE_GROUP", "default"), "SAP AI Core resource group (for provider=aicore)")
|
aicoreResourceGroup := flag.String("aicore-resource-group", envOrDefault("AICORE_RESOURCE_GROUP", "default"), "SAP AI Core resource group (for provider=aicore)")
|
||||||
|
|
||||||
// Backward-compatible alias: --gitea-url shares vcsURL's pointer (last flag wins).
|
// Backward-compatible alias: --gitea-url shares vcsURL's pointer (last flag wins).
|
||||||
// Shares vcsURL pointer; empty default avoids ordering dependency with vcsURL declaration.
|
// Must use *vcsURL as default: StringVar sets *p=value at registration, so empty
|
||||||
flag.StringVar(vcsURL, "gitea-url", "", "Deprecated: use --vcs-url instead")
|
// string would overwrite the env-resolved value from the --vcs-url declaration.
|
||||||
|
flag.StringVar(vcsURL, "gitea-url", *vcsURL, "Deprecated: use --vcs-url instead")
|
||||||
|
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user