-
Notifications
You must be signed in to change notification settings - Fork 9
feat: add support for Linear documents API #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive support for Linear's documents API, enabling CRUD operations on documents through the MCP server. Key changes include new type definitions and guards for documents, implementation of document operations in the Linear API service and a dedicated document service, as well as updated test coverage and CLI command integrations.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
src/types/linear/index.ts | Updated exports to include document types alongside other entities. |
src/types/linear/guards.ts | Added document-specific type guards for argument validation. |
src/types/linear/document.ts | Introduced interfaces for document operations and responses. |
src/services/linear/index.ts | Integrated document service methods into the API service. |
src/services/linear/document-service.ts | Implemented CRUD operations for documents with input handling and error management. |
src/services/linear/base-service.ts | Extended the client interface to support document related methods. |
src/services/tests/test-utils.ts | Added mocks for document methods. |
src/services/tests/linear-api-document-management.test.ts | Added comprehensive tests for document management functionality. |
src/index.ts | Updated command registration and handlers for document API endpoints. |
if (args.isPublic !== undefined) input.isPublic = args.isPublic; | ||
|
||
// Create document | ||
const result = await (this.client as any).createDocument(input); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The createDocument call is missing the required wrapper object; tests expect the input to be passed as { input: ... } instead of directly as input. Consider updating the call to (this.client as any).createDocument({ input }).
const result = await (this.client as any).createDocument(input); | |
const result = await (this.client as any).createDocument({ input }); |
Copilot uses AI. Check for mistakes.
if (args.isPublic !== undefined) input.isPublic = args.isPublic; | ||
|
||
// Update document | ||
const result = await (this.client as any).documentUpdate(input); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentUpdate call is missing the expected input wrapper; tests expect the parameter to be passed as { input: ... }. Consider changing the call to (this.client as any).documentUpdate({ input }).
const result = await (this.client as any).documentUpdate(input); | |
const result = await (this.client as any).documentUpdate({ input }); |
Copilot uses AI. Check for mistakes.
Summary
This PR adds comprehensive support for Linear's documents API, allowing users to create, read, update, and delete documents through the MCP server.
Features
Implementation Details
All tests are passing and documentation is included in the tool schema descriptions.