Repository navigation
feat(linear): add linear_issues, linear_notifications, linear_cycle fetchers - #195
Conversation
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Review rate limit: 0/1 reviews remaining, refill in 4 minutes and 36 seconds.Comment |
…etchers Three fetchers covering the daily-driver Linear surfaces, sharing a single GraphQL client + token-scoped cache key helper: - `linear_issues` — filter-first (status/assignee/team/project/priority/due/ label/group_by/limit), 9 shapes, default LinkedTextBlock with click-through to the issue page - `linear_notifications` — inbox snapshot with read/type/team filters, 8 shapes, default LinkedTextBlock. Covers `IssueNotification`, `ProjectNotification`, and `PullRequestNotification` (Linear's GitHub-integration subtype) with the PR slug parsed from `pullRequest.url` - `linear_cycle` — current/next/previous/N cycle progress for a team, 10 shapes, default Ratio (completed/total), NumberSeries carries the burndown history Safety::Safe across the family — host is `api.linear.app` (fixed in `super::client`), so the personal API key (`options.token` or `LINEAR_TOKEN`) can never be redirected. OAuth flow is intentionally not supported (no place for a callback in a CLI splash). Catalog: ticks `linear_issues` and adds `linear_notifications` + `linear_cycle` boxes under Linear in #66. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
424424f to
daae9cb
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #195 +/- ##
==========================================
- Coverage 81.63% 81.19% -0.45%
==========================================
Files 141 146 +5
Lines 30010 31817 +1807
==========================================
+ Hits 24498 25833 +1335
- Misses 5512 5984 +472
🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
27 new tests across the family closing visible holes: - issues: TextBlock limit cap, Markdown bold/italic, Entries state→Status mapping, Calendar month filtering, Timeline state+priority detail, Bars `group_by = "status"`, cmp_views tie-break by due date - notifications: to_view subject-extraction priority chain (issue > pull_request > project), snippet truncation, missing actor elision, TextBlock cap, Entries unread status, Timeline ts+status, Badge warn band, pretty_type PR review/PR/humanise - cycle: previous/garbage filter fallbacks, TextBlock dates, Markdown bold, Entries 6 canonical rows, Bars state breakdown, Calendar events + anchor clamp when today is past cycle, badge_label done branch, days_left clamp 54 → 81 unit tests; build / clippy / fmt all clean. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Summary
Three Linear fetchers covering the daily-driver surfaces, sharing a single GraphQL client and token-scoped cache key. Ticks
linear_issuesand adds two new boxes (linear_notifications,linear_cycle) under Linear in #66.linear_issues— filter-first issue list (status / assignee / team / project / priority / due / label / group_by / limit). 9 shapes, defaultlinked_text_block. Mirrors thetodoist_taskspattern.linear_notifications— inbox snapshot (mentions / assignments / comments / status changes / GitHub PR notifications). 8 shapes, defaultlinked_text_block. Filter-first (filter_read/filter_type/filter_team/limit). CoversIssueNotification,ProjectNotification, andPullRequestNotification(Linear's GitHub-integration subtype) — PR slug parsed frompullRequest.urlsince thePullRequesttype doesn't expose a repo-name field.linear_cycle— current / next / previous / explicit cycle progress for a team. 10 shapes, defaultRatio(completed/total).NumberSeriescarries the burndown history (completedIssueCountHistory);Barsbreaks down issue states;Calendarhighlights cycle days + due dates;Badgeflagson track/at risk/behind/donebased on completion vs elapsed-time gap.Safety
Safety::Safeacross the family — host isapi.linear.app(fixed insuper::client), so the personal API key (options.tokenorLINEAR_TOKEN) can never be redirected. OAuth flow intentionally not supported (no place for a callback in a CLI splash).Architectural notes
linear/client.rsowns the GraphQL POST, semaphore (4-permit),Retry-After-honoured 429 retry, token resolution, token-scope hash for disk-cache key partitioning. Mirrors the deariary client pattern.linear_notificationsfilters read state client-side because Linear'sNotificationFilterdoesn't exposereadAt.actoris pulled inside each fragment because it lives on subtypes, not theNotificationinterface. PR notifications populatepullRequest, notissue— surfaced as<owner>/<repo>#<number>rows linked to the GitHub PR URL.linear_cyclereturnsFetchError::Failed("no cycle matched filter")when the team has no active / matching cycle — the user can switchcycle = "next" | "previous"to see planned or recently-finished sprints. NumberSeries values are derived from the API'scompletedIssueCountHistory(rounded tou64).Test plan
cargo fmt --all -- --checkcleancargo clippy --all-targets -- -D warningscleancargo testgreen (54 new unit tests across the family — option parsing, filter building, sort ordering, render-body shape branches, snippet truncation, repo-from-PR-URL parsing)cargo run --bin splashboard -- catalog fetcher linear_{issues,notifications,cycle}resolves all shapes against compatible renderers<owner>/<repo>#<n> · PR review · by @<actor> · <PR title>rows (originally the rows were sparse becausePullRequestNotificationis a separate subtype not covered byIssueNotificationfragment).Catalog
#66updated:linear_issues— keeps existing checkbox (will tick on merge)linear_notifications— newlinear_cycle— new🤖 Generated with Claude Code