Repository navigation
Conversation
📝 WalkthroughWalkthroughThe CLI adds Priority: ⬇️ Low Merge Risk: 🔵 Low · up to The commands are mergeable with a bounded test-confidence concern: isolate exit-code state so each Jira failure test proves its own result. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/cli/index-jira.test.ts (1)
86-135: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winIsolate
process.exitCodebetween tests.
mainsetsprocess.exitCodewhen it catches a CLI error, but the shared test hooks do not reset it. A later assertion can therefore pass using the value left by an earlier test, without proving that its own path set the exit code. Clear it before each test and restore the original value afterward.Suggested fix
-import { describe, expect, it, vi } from 'vitest' +import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' ... describe('Jira CLI', () => { + const originalExitCode = process.exitCode + beforeEach(() => { + process.exitCode = undefined + }) + afterEach(() => { + process.exitCode = originalExitCode + }) + useWorktreeAwarenessEnvironment({
🔇 Additional comments (3)
src/cli/handler-group-manifest.ts (1)
15-19: LGTM!src/cli/handlers/jira.ts (2)
12-32: LGTM!
49-54: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value
⚠️ Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.Remove the dead null branch in the issue formatter.
The handler throws on a falsy
response.resultat Line 49. The formatter at Line 56 therefore never receivesnull, and itsissue ? ... : ''branch is unreachable. Remove the ternary for clearer code. This is low-value and optional.
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
537784be-25b1-42e4-9fa6-ae290656b5a9
📒 Files selected for processing (7)
src/cli/args.tssrc/cli/handler-group-manifest.tssrc/cli/handlers/jira.tssrc/cli/index-jira.test.tssrc/cli/root-help-text-primary.tssrc/cli/specs/index.tssrc/cli/specs/jira.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Expose host-owned verified Jira reads and single-attempt writes through the CLI. Preserve site ambiguity checks, old-host capability refusal, atomic label changes, and uncertainty after failed writes. Refs #11986 and #26055. Co-authored-by: Dan Cieslak <[email protected]> Co-authored-by: kokbee <[email protected]>
|
Closing this PR as superseded by #28592, which incorporates the Jira site selection and saved-connection reporting from this work. Thanks for preserving the co-author credit! |
ELI5
A Jira site can be connected in Orca settings while an agent still cannot read a ticket from the command line. This adds read-only Jira commands that use that existing connection, without requiring a separate Atlassian MCP login.
What Changed
orca jira statuslists the selected runtime's saved Jira sites.orca jira issue <key-or-url> [--site <site-id>]reads an issue.orca jira comments <key-or-url> [--site <site-id>]reads comments.The commands call existing Jira RPC methods through the normal runtime client, support
--json, and appear in root help and agent command discovery. URLs must match a connected site's origin and path. A bare key requires--sitewhen multiple sites are connected, preventing an unintended cross-site lookup.A missing issue exits with an error. Existing runtimes also return an empty comment array on some read failures, so the comments command reports
jira_comments_unverifiedwith exit code 1 for empty results instead of claiming that no comments exist. This includes genuinely comment-free issues; the command help documents the limitation.Why
Orca already owns the Jira credentials and read operations. Reusing those methods avoids a second credential store or OAuth flow and preserves the selected runtime's routing. This PR adds the missing CLI entry points; it does not change MCP authentication or the Jira settings connection.
Linked Issue
Implements the read-only issue-access portion of #11982. The broader issue remains open: search, writes, transitions, and a dedicated Jira skill guide are outside this PR.
Visual Proof
N/A — CLI-only changes; no rendered UI changes.
Before:
orca --helpexposes Linear commands but no Jira command group.After:
jira status,jira issue, andjira commentsare registered and discoverable.Testing
On macOS, built the CLI and read an issue using an existing Jira connection on Orca 1.4.222. No credentials or private ticket content are included in this PR.
Scoped oxlint,
pnpm tc:cli, andpnpm run build:clipassed. Five related suites passed 71 tests before the final empty-comment regression; the final Jira suite passed all 8 tests. Coverage includes URL/site mismatch, ambiguous keys, remote-runtime forwarding, unavailable issues, unrelated site credential errors, and unverified empty comments.The
pnpm testwrapper could not start because Bun is unavailable locally. Tests ran withORCA_BACKGROUND_LAUNCH=1 pnpm exec vitest run --config config/vitest.config.tsinstead. Full application checks are left to CI. The build's optional globalorca-devsymlink installation warned about permissions; CLI compilation succeeded.AI Disclosure
Implemented with OpenAI Codex (GPT-6), with separate code review and QA passes.
Review
Independent review identified the ambiguous empty-comment response. The final change reports it as unverified and adds a regression test; follow-up review accepted this compatibility limitation.
Agent skill upstream boundary
Notes
No new runtime methods, wire fields, credential storage, or UI changes. Live validation was on macOS; Windows, Linux, and live SSH were not exercised. Remote runtime selection is covered by an automated test.
Checklist
pnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass; scoped checks passed locally, full checks remain for CI