fix: use Mosaic credential loader for Gitea API token resolution #7

Merged
jason.woltje merged 1 commits from fix/gitea-token-resolution into main 2026-02-24 22:11:44 +00:00
Owner

Fixes broken tea login list token extraction that caused pr-merge.sh to fail with empty baseRefName. Centralizes get_remote_host and get_gitea_token in detect-platform.sh using the Mosaic credential loader.

Fixes broken tea login list token extraction that caused pr-merge.sh to fail with empty baseRefName. Centralizes get_remote_host and get_gitea_token in detect-platform.sh using the Mosaic credential loader.
jason.woltje added 1 commit 2026-02-24 22:11:22 +00:00
The broken `tea login list | awk '{print $NF}'` pattern extracted
the table border character instead of a token, causing pr-metadata.sh
to return empty fields (baseRefName, etc.) and breaking pr-merge.sh.

Centralizes get_remote_host and get_gitea_token in detect-platform.sh
with a 3-tier resolution: Mosaic credential loader (host→service
mapping) → GITEA_TOKEN env var → ~/.git-credentials file.

Removes duplicate local copies from 5 scripts that already source
detect-platform.sh.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
jason.woltje merged commit 09786ee6e0 into main 2026-02-24 22:11:44 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaic/bootstrap#7