Skip to content

C25c: CLI dogfood quick wins (B1+B2+B4)#1

Merged
mfwolffe merged 8 commits into
trunkfrom
c25c/quick-wins
May 17, 2026
Merged

C25c: CLI dogfood quick wins (B1+B2+B4)#1
mfwolffe merged 8 commits into
trunkfrom
c25c/quick-wins

Conversation

@espadonne
Copy link
Copy Markdown
Contributor

Summary

Bundles the three CLI-side findings from the B-audit. Each is independently small; ships as one PR for review efficiency (matches the S62 envelope-batch pattern).

  • B1 — pr merge success line accepts merge_commit_sha. MergeResult now decodes both the gh-compat field and the legacy sha. New accessor CommitSHA() prefers gh-compat. Without this the success line was rendering ("Merged PR #N at ") with an empty SHA on shithub builds that emit only merge_commit_sha.
  • B2 — --json field gh-compat aliases. repo view / repo list export catalogs expose forkCount, stargazerCount, watcherCount alongside the legacy forks / stargazers / watchers. Ported gh scripts (gh repo view --json stargazerCount) work verbatim. Both names populated for one release cycle.
  • B4 — repo fork friendlier own-repo error. Pre-flight check resolves the authenticated user (cached) and refuses with a clear message naming the repo before round-tripping. --org bypasses the guard (forking your own repo into a different org is a real workflow).

Test plan

  • TestMergeCommitSHA_GhCompat — decoder accepts merge_commit_sha.
  • TestMergeCommitSHA_PrefersGhCompat — gh-compat wins on both-fields-set.
  • TestViewJSONGhCompatAliases--json stargazerCount,forkCount,watcherCount projects numeric values.
  • TestForkRejectsOwnRepo — clear pre-flight error; forks endpoint never hit.
  • TestForkOwnRepoIntoOrgAllowed--org bypass.
  • Full make ci green locally.

@mfwolffe mfwolffe merged commit 9f3339e into trunk May 17, 2026
3 checks passed
@mfwolffe mfwolffe deleted the c25c/quick-wins branch May 17, 2026 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants