Skip to content

v0.6.1: add -R/--repo flag to prs, issues, checks#7

Merged
corvid-agent merged 1 commit into
mainfrom
fix/v0.6.1-add-repo-flag
May 21, 2026
Merged

v0.6.1: add -R/--repo flag to prs, issues, checks#7
corvid-agent merged 1 commit into
mainfrom
fix/v0.6.1-add-repo-flag

Conversation

@corvid-agent
Copy link
Copy Markdown
Contributor

Summary

Closes the cross-repo gap in v0.6.0. Without -R, every gh subcall in prs/issues/checks defaulted to the agent's cwd for repo resolution. When a Discord-driven agent (running in one project's worktree) was asked about a PR in a different repo, it either pointed at the wrong repo or 404'd. We saw the corvidagent loop on prs view 5 --comments 8+ times trying to surface a PR that did exist — just not in the merlin tree gh happened to be sitting on.

Changes

Uniform -R, --repo OWNER/NAME across:

  • prs — list, view, create, comment, review, merge, close, reopen
  • issues — list, view, create, comment, close, reopen
  • checks — with a default-branch fallback when -R is given but --branch isn't

repo already had it via #6. Plugin and arg descriptions in plugin.toml updated to surface -R prominently so the agent picks it up on the first attempt.

Test plan

  • bash -n clean across bin/
  • shellcheck --severity=warning clean
  • Smoke: prs view 5 -R CorvidLabs/corvid-verify --json returns the right PR from outside that repo's tree
  • Smoke: issues list -R CorvidLabs/merlin --limit 3 works from any cwd
  • CI: shellcheck + bash-syntax + smoke (--help)

Without -R, every gh subcall in prs/issues/checks defaulted to the
agent's cwd for repo resolution. When the Discord agent was asked
about a PR in a different repo than the one it was running from,
gh either pointed at the wrong repo or 404'd. The user saw the
agent loop on the same `prs view 5 --comments` call 8+ times trying
to surface a PR that DID exist — just not in the merlin tree gh
was sitting on.

Add a uniform -R, --repo OWNER/NAME flag across:
  - prs (all actions: list, view, create, comment, review, merge,
        close, reopen)
  - issues (all actions: list, view, create, comment, close, reopen)
  - checks (with a sensible default-branch fallback when -R is given
            but --branch isn't)

repo already had it via 0.6.0. Plugin description + arg description
in plugin.toml updated to surface -R prominently so the agent picks
it on the first attempt.

Bash strict-mode safe (REPO_FLAGS uses the +-form expansion);
shellcheck clean.
@gemini-code-assist
Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@corvid-agent corvid-agent merged commit 7c22867 into main May 21, 2026
5 checks passed
@corvid-agent corvid-agent deleted the fix/v0.6.1-add-repo-flag branch May 21, 2026 23:30
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.

1 participant