feat: todoist push command#70
Open
nickhart wants to merge 5 commits into
Open
Conversation
Add `md2do todoist push <file>` command that parses a markdown file's
H1/H2 structure into a Todoist project with sections and tasks, then
writes `{todoist:ID}` back to the headings for correlation.
- New document parser in @md2do/core for markdown → tree structure
- Push engine in @md2do/todoist creates project, sections, and tasks
- TodoistClient gains addProject, getSections, addSection methods
- Writer gains updateHeadings for atomic heading ID write-back
- CLI supports --dry-run and --force options
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Todoist sections are flat (no nesting), so all H2+ headings should be treated equally. Previously H3+ headings were silently ignored and their tasks folded into the preceding H2 section. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add BRANCH_STATUS.md at repo root with done/remaining checklist - Add docs/cli/todoist/push.md reference page - Update todoist CLI overview to include push command - Update integrations/todoist.md with push workflow and examples - Update roadmap to v0.7.x and add Todoist Push in-progress section Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Fix sync command to strip both {todoist:ID} and [todoist:ID] when
removing a deleted task's link (was only handling legacy bracket form)
- Add 11 unit tests for pushDocument() covering: project creation,
section creation, task routing, completed task skipping, result counts,
section ID mapping, guard against re-push, priority/tag/due date mapping
- Add **/tests/**/*.ts ESLint override to disable unbound-method rule,
which false-positives on vitest mock assertions
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Coverage after merging feat/todoist-push into main will be
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
md2do todoist push <file>— a one-way command that pushes a markdown file to Todoist as a new project with sections and tasks{todoist:ID}back to H1 and H2+ headings after pushing for correlation--dry-run(preview) and--force(skip confirmation / re-push) flagsChanges
@md2do/core: newparseDocument()function andDocumentTreetypes for parsing markdown H1/H2/H3+ structure@md2do/core: newupdateHeadings()writer for atomic heading ID write-back@md2do/todoist: newpushDocument()engine;TodoistClientgainsaddProject,addSection,getSections@md2do/cli:todoist pushsubcommand wired updocs/cli/todoist/push.md, updated CLI overview, integration guide, and roadmap**/tests/**/*.tsoverride to disableunbound-methodfalse positive on vitest mocksTest plan
pnpm -r run test:run— all tests pass (11 new push engine tests, 8 document parser tests)md2do todoist push <file> --dry-run— preview output, no API callsmd2do todoist push <file>— creates project/sections/tasks in Todoist, writes IDs back to filemd2do todoist push <file>on already-pushed file — errors without--forcemd2do todoist push <file> --force— re-pushes, creates new projectBacklog (not in this PR)
🤖 Generated with Claude Code