Skip to content

Resolve Linear web app URLs into entity references - #62

Open
jamiew wants to merge 7 commits into
dorkitude:masterfrom
jamiew:parse-linear-urls
Open

Resolve Linear web app URLs into entity references#62
jamiew wants to merge 7 commits into
dorkitude:masterfrom
jamiew:parse-linear-urls

Conversation

@jamiew

@jamiew jamiew commented Aug 17, 2026

Copy link
Copy Markdown

accept linear.app URLs anywhere a reference is taken, including --team, --project and --parent

plus:

  • resolve GitHub pull request URLs to the linked issue
  • reject Linear review URLs with an explanation and a suggested issue search

examples:

linctl issue show https://linear.app/hackers/issue/HTP-123/pool-on-the-roof-is-leaking  # HTP-123
linctl issue show https://github.com/hackers/pool/pull/42                               # the linked issue

go tests passing. Hope this is good enough and useful for you too! I copy the Linear URLs all the time and expect it to just work, and now it does

jamiew added 3 commits July 30, 2026 18:24
- new pkg/api/reference.go parses linear.app URLs for issues, projects,
  documents, initiatives, teams and reviews, plus scheme-less pastes and
  linear:// deep links
- wired into the API client, so URLs work for positional args and for flags
  like --team, --project and --parent
- comment URLs carry only an 8-char prefix, so those resolve via the issue's
  comments
- a GitHub pull request URL resolves to the issue it is attached to
- review URLs cannot be resolved to an issue by Linear's API, so they now fail
  with an explanation and a suggested issue search

@dorkitude dorkitude left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran go test ./... successfully on b977f74. The feature direction and test coverage are useful, but this needs an update before merge:

  1. The branch now conflicts with master in CHANGELOG.md and pkg/api/queries.go. When resolving GetProjects, retain both this PR’s slugId selection and the newly released status { id name type color position } selection; choosing either conflict side as-is regresses the other feature. Please add or adjust a query-level test so both fields remain selected.
  2. Please remove the unrelated .claude/ ignore change. The repository asks for focused patches, and this does not support URL references.
  3. Re-run go test ./... after integrating current master.

The live Linear schema still exposes non-deprecated attachmentsForURL(url:, first:), so that part of the implementation remains current.

jamiew added 3 commits August 24, 2026 10:27
keep both slugId and status in the GetProjects selection
- drop the unrelated .claude/ gitignore change
- assert GetProjects still selects both slugId and status
- say plainly that Linear review URLs are not references
@jamiew jamiew changed the title Accept Linear web app URLs as entity references Accept Linear issue URLs as entity references Aug 24, 2026
@jamiew jamiew changed the title Accept Linear issue URLs as entity references Resolve Linear web app URLs into entity references Aug 24, 2026
@jamiew

jamiew commented Aug 24, 2026

Copy link
Copy Markdown
Author

@dorkitude updated per feedback, lmk if OK. Tried a few variations on the copy as well to try but ymmv

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