Skip to content

Commit 5f39c7d

Browse files
committed
Minor cleanup
1 parent b2965c6 commit 5f39c7d

File tree

4 files changed

+5
-104
lines changed

4 files changed

+5
-104
lines changed

src/features/issues/handlers/issue.handler.ts

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,9 @@ import {
66
IssueHandlerMethods,
77
CreateIssueInput,
88
CreateIssuesInput,
9-
BulkUpdateIssuesInput,
109
SearchIssuesInput,
1110
DeleteIssueInput,
12-
DeleteIssuesInput,
1311
CreateIssueResponse,
14-
CreateIssuesResponse,
15-
UpdateIssuesResponse,
1612
SearchIssuesResponse,
1713
DeleteIssueResponse,
1814
Issue,
@@ -147,33 +143,4 @@ export class IssueHandler extends BaseHandler implements IssueHandlerMethods {
147143
this.handleError(error, 'delete issue');
148144
}
149145
}
150-
151-
/* // Remove bulk delete handler method
152-
/**
153-
* Deletes multiple issues in bulk.
154-
*/
155-
/*
156-
async handleDeleteIssues(args: DeleteIssuesInput): Promise<BaseToolResponse> {
157-
try {
158-
const client = this.verifyAuth();
159-
this.validateRequiredParams(args, ['ids']);
160-
161-
if (!Array.isArray(args.ids)) {
162-
throw new Error('Ids parameter must be an array');
163-
}
164-
165-
const result = await client.deleteIssues(args.ids) as DeleteIssueResponse;
166-
167-
if (!result.issueDelete.success) {
168-
throw new Error('Failed to delete issues');
169-
}
170-
171-
return this.createResponse(
172-
`Successfully deleted ${args.ids.length} issues: ${args.ids.join(', ')}`
173-
);
174-
} catch (error) {
175-
this.handleError(error, 'delete issues');
176-
}
177-
}
178-
*/
179146
}

src/features/issues/types/issue.types.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@ export interface UpdateIssueInput {
2626
stateId?: string;
2727
}
2828

29-
export interface BulkUpdateIssuesInput {
30-
issueIds: string[];
31-
update: UpdateIssueInput;
32-
}
33-
3429
export interface SearchIssuesInput {
3530
query?: string;
3631
filter?: {
@@ -47,16 +42,13 @@ export interface SearchIssuesInput {
4742
first?: number;
4843
after?: string;
4944
orderBy?: string;
45+
id: string;
5046
}
5147

5248
export interface DeleteIssueInput {
5349
id: string;
5450
}
5551

56-
export interface DeleteIssuesInput {
57-
ids: string[];
58-
}
59-
6052
/**
6153
* Response types for issue operations
6254
*/

src/graphql/client.ts

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,12 @@ import { LinearClient } from '@linear/sdk';
22
import { DocumentNode } from 'graphql';
33
import {
44
CreateIssueInput,
5-
CreateIssuesInput,
65
CreateIssueResponse,
7-
CreateIssuesResponse,
86
UpdateIssueInput,
97
UpdateIssuesResponse,
108
SearchIssuesInput,
119
SearchIssuesResponse,
1210
DeleteIssueResponse,
13-
Issue,
1411
IssueBatchResponse
1512
} from '../features/issues/types/issue.types.js';
1613
import {
@@ -130,13 +127,6 @@ export class LinearGraphQLClient {
130127
});
131128
}
132129

133-
/* // Remove bulk update client method
134-
// Bulk update issues
135-
async updateIssues(ids: string[], input: UpdateIssueInput): Promise<UpdateIssuesResponse> {
136-
return this.execute<UpdateIssuesResponse>(UPDATE_ISSUES_MUTATION, { ids, input });
137-
}
138-
*/
139-
140130
// Create multiple labels
141131
async createIssueLabels(labels: LabelInput[]): Promise<LabelResponse> {
142132
return this.execute<LabelResponse>(CREATE_ISSUE_LABELS, { labels });
@@ -181,40 +171,4 @@ export class LinearGraphQLClient {
181171
async deleteIssue(id: string): Promise<DeleteIssueResponse> {
182172
return this.execute<DeleteIssueResponse>(DELETE_ISSUE_MUTATION, { id: id });
183173
}
184-
185-
/* // Remove bulk delete client method
186-
// Delete multiple issues by iterating single deletes
187-
async deleteIssues(ids: string[]): Promise<DeleteIssueResponse> {
188-
// const { DELETE_ISSUES_MUTATION } = await import('./mutations.js');
189-
// return this.execute<DeleteIssueResponse>(DELETE_ISSUES_MUTATION, { ids });
190-
191-
let success = true;
192-
const errors: string[] = [];
193-
194-
for (const id of ids) {
195-
try {
196-
// Call the verified single delete method for each ID
197-
const result = await this.deleteIssue(id);
198-
if (!result.issueDelete.success) {
199-
success = false;
200-
errors.push(`Failed to delete ${id}`);
201-
// Optionally log the specific error from result if available
202-
}
203-
} catch (error) {
204-
success = false;
205-
errors.push(`Error deleting ${id}: ${error instanceof Error ? error.message : error}`);
206-
}
207-
}
208-
209-
if (!success) {
210-
// We might want a more structured error response here,
211-
// but for now, just indicate overall failure and list errors.
212-
throw new Error(`Bulk delete failed for some issues: ${errors.join('; ')}`);
213-
}
214-
215-
// Return a success structure compatible with DeleteIssueResponse if needed
216-
// Adjust based on actual expected return type for bulk operation success
217-
return { issueDelete: { success: true } } as DeleteIssueResponse;
218-
}
219-
*/
220174
}

src/index.ts

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,13 @@
11
#!/usr/bin/env node
22
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
3-
import {
4-
// CallToolRequestSchema,
5-
ErrorCode,
6-
// ListToolsRequestSchema,
7-
McpError,
8-
} from '@modelcontextprotocol/sdk/types.js';
9-
// import { LinearAuth } from './auth.js';
10-
// import { LinearGraphQLClient } from './graphql/client.js';
11-
// import { HandlerFactory } from './core/handlers/handler.factory.js';
12-
// import { toolSchemas } from './core/types/tool.types.js';
13-
14-
// --- Start: Echo Server Example ---
15-
import { McpServer, ResourceTemplate } from "@modelcontextprotocol/sdk/server/mcp.js";
16-
import { z } from "zod"; // Make sure zod is installed: npm install zod
3+
import { ErrorCode, McpError } from '@modelcontextprotocol/sdk/types.js'; // Removed unused schemas
4+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
5+
import { z } from "zod";
176

187
import { LinearAuth } from './auth.js';
198
import { LinearGraphQLClient } from './graphql/client.js';
209
import { HandlerFactory } from './core/handlers/handler.factory.js';
21-
// We don't need the old toolSchemas anymore
22-
// import { toolSchemas } from './core/types/tool.types.js';
10+
// Removed unused toolSchemas import
2311

2412
async function runLinearServer() {
2513
console.error('Starting Linear MCP server using McpServer...');

0 commit comments

Comments
 (0)