Skip to content

Add --issue <fullId> flag to il issues for cross-project single-issue lookup #1013

@acreeger

Description

@acreeger

Summary

Add a new --issue <fullId> flag to il issues that fetches a single issue by its full identifier — including issues that live outside the currently configured project. The VS Code extension needs this to render an inline preview when a user pastes a URL/ID into the Create Loom or Plan Epic inputs.

Note on scope: URL/identifier parsing in IdentifierParser, il start, and il plan is already covered by #1009 (PR #1010). This issue is only about adding --issue <fullId> to il issues. It depends on the ParsedIssueInput shape being introduced by #1009.

Driven by the VS Code extension:

Background

Today il issues --json returns the list of issues for the currently configured project's tracker. There is no way to fetch a single issue by full identifier, and no way to fetch an issue that lives outside the configured project.

The extension's URL-paste flow needs to look up issue metadata (title, kind, etc.) for a single issue identified by a URL or canonical id, even when that issue is in:

  • A different GitHub repo (cross-repo, same provider).
  • A different Linear team within the same workspace.
  • A different Jira project within the same host.

Cross-workspace Linear and cross-host Jira are out of scope — those should emit a clear error.

Required changes

1. New flag: il issues --issue <fullId>

Files: src/commands/issues.ts, src/cli.ts

2. Cross-project lookup support

The new flag must work when the parsed identifier points outside the currently configured project:

  • GitHub cross-repo: parsed ParsedIssueInput.repo is plumbed to the gh invocation / GitHub service so the lookup hits <owner>/<repo> rather than the configured one.
  • Linear cross-team (same workspace): standard GraphQL issue(id:) lookup is already workspace-scoped; identifier-based fetch resolves any team. No special handling needed beyond confirming this works.
  • Jira cross-project (same host): REST /issue/{id} honors cross-project on the same host; ensure the existing client is used.
  • Jira cross-host: detect parsed.host !== configuredHost and throw a clear error ("cross-host Jira not yet supported — configured host is <host>"). Do NOT attempt re-auth or workspace switching.
  • Linear cross-workspace: out of scope.

3. Tests

  • il issues --issue <fullId> returns a length-1 array for: bare id, GitHub URL (cross-repo), Linear URL (cross-team in same workspace), Jira URL (cross-project on same host).
  • Returns a clear error for: cross-host Jira URL, malformed input, non-existent identifier.

Out of scope

  • Anything in #1009 (URL parsing in IdentifierParser, il start, il plan).
  • Cross-host Jira fetch.
  • Cross-workspace Linear fetch.

Acceptance criteria

  • `il issues --issue ` accepts URL or canonical id and outputs a length-1 array in `il issues --json` shape.
  • Works for GitHub cross-repo URLs.
  • Works for Linear cross-team (same workspace) URLs/ids.
  • Works for Jira cross-project (same host) URLs/keys.
  • Returns a clear error for cross-host Jira URLs (does not attempt fetch).
  • No regressions in existing `il issues --json` behavior.
  • Tests cover all of the above.

Consumer

VS Code extension:

  • iloom-vscode#261 — feature request
  • iloom-vscode#262 — extension PR (already wires the lookup round-trip against this contract)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions