Skip to content

Add Linear worker sync example - #14

Open
thisisgoldman wants to merge 1 commit into
mainfrom
add-linear-worker-example
Open

Add Linear worker sync example#14
thisisgoldman wants to merge 1 commit into
mainfrom
add-linear-worker-example

Conversation

@thisisgoldman

Copy link
Copy Markdown
Contributor

Summary

Replaces the placeholder at examples/workers/syncs/linear/ with a working Notion worker that one-way syncs Linear issues into a managed Notion database.

  • Two syncs share one databaseissuesBackfill (replace, manual) reconciles by mark-and-sweep; issuesDelta (incremental, every 5m) advances an updatedAt watermark with a 15s consistency buffer.
  • Robust delta cursor — state shape is { since, after, maxSeen } so multi-page catch-up cycles never lose records.
  • No webhooks needed — Linear's GraphQL updatedAt filter handles change detection cleanly.

Test plan

  • npm install && npm run check in examples/workers/syncs/linear/
  • ntn workers env set LINEAR_API_KEY=...
  • ntn workers deploy --name linear-sync
  • ntn workers sync trigger issuesBackfill and confirm rows appear in the auto-created "Linear Issues" database
  • Edit an issue in Linear, wait 5m (or trigger issuesDelta manually), confirm Notion row updates
  • Re-read the README top-to-bottom in a fresh shell and walk every step

🤖 Generated with Claude Code

Replaces the placeholder with a working Notion worker that syncs Linear
issues into a managed Notion database using a backfill+delta pair:

- issuesBackfill (replace, manual) paginates every issue via Linear's
  GraphQL connection and lets the runtime mark-and-sweep deletes.
- issuesDelta (incremental, 5m) advances an updatedAt watermark with a
  15s consistency buffer, paginates within a cycle, and carries maxSeen
  across pages to avoid losing records.

Includes a Diataxis how-to README covering API key creation, secrets,
deploy, backfill trigger, and customization tips.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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