gstack/gstack-upgrade
Brandon Pugsley 3c64fbf405 fix(v1.27 migration): qualify repo with owner so gh rename actually runs
`gh repo rename --repo` and `gh repo edit` both require the
"[HOST/]OWNER/REPO" form. The v1.27.0.0 migration was passing a bare
repo name (e.g. `gstack-brain-Brandon`), which `gh` rejects with:

  expected the "[HOST/]OWNER/REPO" format, got "gstack-brain-Brandon"

Both invocations suppressed stderr with `2>/dev/null`, so the failure
surfaced only as the generic "repo may not exist or permission denied"
warning — misdirecting users who actually have ADMIN on the repo.
The step was then `mark_done`'d, so re-running the upgrade does not
retry. The local pointer at ~/.gstack-artifacts-remote.txt ends up
referencing a non-existent repo until the user notices.

Reproduction (before fix):

  $ gh repo rename gstack-artifacts-Brandon --repo gstack-brain-Brandon --yes
  expected the "[HOST/]OWNER/REPO" format, got "gstack-brain-Brandon"

Fix: resolve the authenticated user's login via `gh api user --jq .login`
and qualify both the existing-repo check (`gh repo view`) and the
rename/edit calls. Capture stderr from each attempt so the warning
includes the real `gh` error instead of a generic guess.

The fake-gh test fixture grows a single case for `gh api user` so the
existing test matrix continues to drive the rename path.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 18:03:08 -04:00
..
migrations fix(v1.27 migration): qualify repo with owner so gh rename actually runs 2026-05-11 18:03:08 -04:00
SKILL.md fix: avoid tilde-in-assignment to silence Claude Code permission prompts (#993) 2026-04-16 14:49:56 -07:00
SKILL.md.tmpl fix: avoid tilde-in-assignment to silence Claude Code permission prompts (#993) 2026-04-16 14:49:56 -07:00