feat(cli): infer version host from cwd origin #7
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/version-cwd-infer"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
forgejo-mcp versionwas the only CLI subcommand that ignored thecwd-inference seam shared by every other entry point. From inside a
checkout with an
originremote pointing at a Forgejo host, all threePR subcommands and the OpenCode plugin's
get_versionresolve the hostwithout flags or env — but
versionrequired either--hostorFORGEJO_URL. That asymmetry broke the "one tool, three ways" promise:the cheapest, most common smoke ("does this Forgejo talk to my repo?")
could not be run from the repo itself.
This brings
versionto parity with the OpenCode plugin'sget_version(same precedence:
--host→ cwdorigin→FORGEJO_URL) and with thethree PR subcommands. The shared
resolveFromCwdmodule already does thework;
runVersionwas simply skipping it.