fix(git-tools): issue-comment.sh resolves API base without monolith GITEA_URL (#1502)
ci/woodpecker/push/publish Pipeline was successful
ci/woodpecker/push/publish Pipeline was successful
This commit was merged in pull request #1502.
This commit is contained in:
@@ -155,8 +155,15 @@ gitea_resolve_api_for_login() {
|
||||
}
|
||||
fi
|
||||
configured_url=$(get_gitea_url_for_host "$host") || {
|
||||
echo "Error: Configured Gitea URL not found for comment read-back verification" >&2
|
||||
return 1
|
||||
# No monolith-configured Gitea URL for this host (#1450): seat-token-only
|
||||
# hosts carry no gitea-mosaicstack/gitea-usc credentials.sh entry and no
|
||||
# bare GITEA_URL, so get_gitea_url_for_host has nothing to match against.
|
||||
# Synthesize the API base directly from the git remote's own host --
|
||||
# exactly the trust model issue-create.sh's REST fallback already uses
|
||||
# successfully on these hosts. This is NOT a cross-host guess: $host came
|
||||
# from get_remote_host() reading THIS repo's own origin remote, so the
|
||||
# resolved base always matches the repo actually being acted on.
|
||||
configured_url="https://${host}"
|
||||
}
|
||||
repo=$(get_gitea_repo_slug_for_url "$configured_url") || {
|
||||
echo "Error: Could not resolve Gitea owner/repository relative to configured URL" >&2
|
||||
|
||||
Reference in New Issue
Block a user