Add document management and status update commands#2
Merged
Conversation
- Create test files for all 5 document subcommands: - document-list.test.ts: tests for listing documents with filters - document-view.test.ts: tests for viewing document content - document-create.test.ts: tests for creating documents - document-update.test.ts: tests for updating documents - document-delete.test.ts: tests for soft/permanent deletion - Update README.md with document command usage examples - Tests follow existing patterns using MockLinearServer and snapshot testing - Tests will compile once command implementations are completed
- Create document-delete.ts with soft delete support - Linear API only supports soft delete (moves to trash), no permanent deletion - Implemented single delete with confirmation prompt and -y flag to skip - Implemented bulk delete with --bulk, --bulk-file, and --bulk-stdin support - Updated document-delete.test.ts to match implementation
Add document-update.ts with partial update support: - --title: Update document title - --content: Inline content update - --content-file: Read content from file - --icon: Update document icon - --edit: Open current content in $EDITOR for editing Includes openEditorWithContent helper for --edit mode that fetches current document content, opens editor, and submits changes.
Add document-create.ts with full support for creating Linear documents: - Support for --title, --content, --content-file, --project, --issue, --icon flags - Content resolution from inline, file, stdin, and $EDITOR - Interactive mode (-i) with prompts for all fields - Project and issue attachment support Also creates document.ts parent command and registers it in main.ts.
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
linear document create/list/view/update/delete)linear project-update create/list) with aliaspulinear initiative-update create/list) with aliasiuNew Commands
Document Management
linear document list- List documents (filter by project/issue)linear document view <slug>- View document contentlinear document create- Create documents (inline, file, stdin, editor)linear document update <slug>- Update documentslinear document delete <slug>- Delete documents (soft/permanent, bulk)Project Status Updates
linear project-update create <projectId>- Post timeline updates to projectslinear project-update list <projectId>- List project status updates--healthflag (onTrack/atRisk/offTrack)puInitiative Status Updates
linear initiative-update create <initiativeId>- Post timeline updates to initiativeslinear initiative-update list <initiativeId>- List initiative status updates--healthflag (onTrack/atRisk/offTrack)iuTest plan
linear --help