| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
| |
Stubs the single GraphQL chokepoint and drives the full integration path against a temp active file: run a saved query, render with the source header, read the source back, refresh the same source with an in-place merge, switch sources while the buffer is dirty (the edit is preserved, not clobbered), then from inside a rendered issue subtree sync an edited description, add a comment, and set priority. Everything above the wire — filter compilation, normalization, sort, render, header round-trip, merge, the conflict gate, comment append, and the field setter — runs for real, so the query and org-representation layers are exercised together rather than in isolation. 388 tests green (384 unit + 4 integration).
|
| |
|
|
| |
Added ERT tests for the deterministic-ordering guarantees: title sort folds nil and empty titles to the empty key (ordered first ascending); a nil (none) priority sorts last ascending and first descending; equal keys keep input order ascending and reverse it descending (Emacs sort is stable, then nreverse); and the render boundary sorts by priority after normalization even when a node omits the field. 384 tests green.
|
| |
|
|
| |
Added ERT tests: append targets the current issue's Comments subtree even when a later issue already has its own Comments; add-comment from inside a comment subtree refuses (no issue id at that heading); edit-current-comment refuses a comment missing LINEAR-COMMENT-ID with no network call; and a comment body containing drawer-looking (:note:) text reads back intact. 380 tests green.
|
| |
|
|
| |
Added a round-trip test for the markdown boundary cases the coverage audit flagged: multiple links on a line, parens inside a URL, inline code whose contents look like markdown, non-ASCII prose, and unclosed / trailing fenced code. All round-trip to identity, so a fetch with no edit cannot change the remote on push. Two cases (paren-URL and markdown-looking inline code) round-trip safely despite an imperfect intermediate Org form, noted in the test and filed as a display-fidelity follow-up. 376 tests green.
|
| |
|
|
| |
Added ERT tests for the generated #+LINEAR-SOURCE header: a syntactically malformed source line reads back nil (no reader error) and refresh-current-view surfaces the "no source recorded" user error; a valid-but-unknown :type reaches the "Unknown Linear source type" user error; and a source whose name and filter carry quotes, parens, colons, and non-ASCII round-trips through build-org-content and read-active-source unchanged. 375 tests green.
|
| |
|
|
| |
Added ERT tests that the per-team collection cache and the resolvers fail soft: pearl--team-collection returns nil and caches nothing on a malformed (missing nodes) or nil response, so a retry refetches and a later success populates the cache; pearl--resolve-team-id returns nil rather than erroring when its backing fetch fails; pearl--custom-views likewise does not cache nil and recovers on a later call. Also dropped a stale pearl--cache-issues binding from this file's cache-reset macro — that variable was removed earlier. 371 tests green.
|
| |
|
|
| |
Added ERT tests that the query and pager layer degrades gracefully on bad payloads instead of erroring: a success response missing data.issues yields an empty result; data.customView nil yields a structured result with no Lisp error; a page reporting has-next-page with a nil end-cursor terminates at the max-pages bound rather than looping; and pearl--node-list returns the empty list for non-list or non-vector nodes. 366 tests green.
|
| |
|
|
| |
Extended the dirty-buffer coverage: with known content saved to disk and an unsaved edit on top, pearl--update-org-from-issues leaves the buffer modified with its edit, leaves the on-disk file at the original saved content (not the render, not the buffer text), and still surfaces the dirty buffer per the UX contract. 362 tests green.
|
| |
|
|
| |
Added an ERT test that pearl-delete-current-issue, when the confirmation is given but pearl--delete-issue-async returns :success nil, leaves the issue subtree and its sibling intact rather than removing local state on a failed remote delete. The command already behaves correctly. 361 tests green.
|
| |
|
|
| |
Added ERT tests that the three sync commands leave provenance untouched when the push fails (:success nil): pearl-sync-current-issue keeps LINEAR-DESC-SHA256 and -UPDATED-AT, pearl-sync-current-issue-title keeps LINEAR-TITLE-SHA256, and pearl-edit-current-comment keeps LINEAR-COMMENT-SHA256 — and in each case the edited text stays in the buffer for retry. Each test asserts the push was attempted with the rendered text. The commands already behave correctly; this locks it. 360 tests green.
|
| |
|
|
| |
Added ERT tests that the four field setters preserve local org state when the issueUpdate mutation fails (returns :success nil): set-priority keeps the cookie, set-state keeps the TODO keyword and LINEAR-STATE drawer, set-assignee keeps the assignee drawer, set-labels keeps the labels drawer. Each test also asserts the push was attempted with the intended input, so a regression that simply stopped calling the API would still fail rather than pass silently. The commands already behave correctly — this locks it. 357 tests green.
|
| |
|
|
| |
pearl-new-issue was 129 lines — long but linear (a run of creation prompts), and untested since it is eight interactive reads. I pulled out the one intricate, self-contained piece: the issue-type label selection that groups labels by their " - " category prefix and does the two-stage category-then-label pick. It is now pearl--read-issue-label, called for selected-type. Verbatim move, no logic change; new-issue drops to 93 lines. 353 tests green.
|
| |
|
|
| |
set-priority, set-state, set-assignee, and set-labels each repeated the same tail: push the issueUpdate field, and on success update the heading or drawer at the marker, message, and surface the buffer; on failure, message. I pulled that into pearl--push-issue-field, which takes the fields alist, a success thunk (the per-field buffer update), and the two messages. Each command keeps its own completion source, guards, and id resolution. No behavior change; 353 tests green.
|
| |
|
|
| |
The description, title, and comment syncs each carried the same :noop / :conflict / :push dispatch — only the hash property, the local-text source, the fetch and push functions, the apply step, and the status messages differed. I pulled the dispatch into pearl--commit-sync-decision, which takes a spec plist for the varying parts (description alone advances LINEAR-DESC-UPDATED-AT, via :after-push). The three commands now build a spec and call it, and the comment's own-comment permission check stays in its caller. No behavior change — 353 tests green, including the sync, title-sync, comment-editing, and conflict suites.
|
| |
|
|
| |
The guard `(unless (ignore-errors (org-back-to-heading t) t) (user-error ...))` was copy-pasted across ten issue-at-point commands. I pulled it into pearl--goto-heading-or-error, which takes an optional message so the one comment-specific variant ("Not on a Linear comment") still reads right. Same point move, same user-error type and text — no behavior change; 353 tests green.
|
| |
|
|
| |
The variable was only ever declared and set to nil in pearl-clear-cache — never populated or read anywhere. I removed the defvar, the clear-cache line, and the stale "issues" mention in that docstring. No behavior change; the suite stays at 353 green.
|
| |
|
|
| |
I made the recursive backronym the README title — Pearl Edits and Reflects Linear (P=Pearl, E=Edits, A=and, R=Reflects, L=Linear) — and named it in the opening line, matching the sibling projects' READMEs (Chime, emacs-wttrin). Added an Umberto Eco epigraph, "We like lists because we don't want to die.", in the same quote style they use. The cgit repo description on cjennings.net is set to match.
|
| |
|
|
| |
I rewrote the README into a sectioned guide — a nav header over Features, Installation, Quick Start, Commands, The Org File, Configuration, Development & Testing, FAQ, Troubleshooting, History, and License — and repointed every repository URL off the deleted github.com/cjennings/pearl onto https://git.cjennings.net/pearl.git. The repoint also covers the URL header in pearl.el, the Eask website-url, and the package-summary repo link. The upstream credit to Gael Blanchemain's linear-emacs is unchanged.
|
|
|
Pearl fetches Linear issues into an org file and syncs edits back. It covers list / custom views / saved queries, per-issue and bulk rendering with comments inline, conflict-aware sync of descriptions, titles, and comments, field commands for priority / state / assignee / labels, and a transient dispatch menu. The render folds to a scannable outline and nests issues under a sortable parent.
Based on and inspired by Gael Blanchemain's linear-emacs.
|