@nexus2520/jira-mcp-server 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +318 -0
- package/build/handlers/comment-handlers.d.ts +32 -0
- package/build/handlers/comment-handlers.d.ts.map +1 -0
- package/build/handlers/comment-handlers.js +91 -0
- package/build/handlers/comment-handlers.js.map +1 -0
- package/build/handlers/issue-handlers.d.ts +65 -0
- package/build/handlers/issue-handlers.d.ts.map +1 -0
- package/build/handlers/issue-handlers.js +250 -0
- package/build/handlers/issue-handlers.js.map +1 -0
- package/build/handlers/metadata-handlers.d.ts +19 -0
- package/build/handlers/metadata-handlers.d.ts.map +1 -0
- package/build/handlers/metadata-handlers.js +96 -0
- package/build/handlers/metadata-handlers.js.map +1 -0
- package/build/handlers/project-handlers.d.ts +19 -0
- package/build/handlers/project-handlers.d.ts.map +1 -0
- package/build/handlers/project-handlers.js +36 -0
- package/build/handlers/project-handlers.js.map +1 -0
- package/build/handlers/search-handlers.d.ts +19 -0
- package/build/handlers/search-handlers.d.ts.map +1 -0
- package/build/handlers/search-handlers.js +60 -0
- package/build/handlers/search-handlers.js.map +1 -0
- package/build/handlers/transition-handlers.d.ts +32 -0
- package/build/handlers/transition-handlers.d.ts.map +1 -0
- package/build/handlers/transition-handlers.js +81 -0
- package/build/handlers/transition-handlers.js.map +1 -0
- package/build/handlers/user-handlers.d.ts +24 -0
- package/build/handlers/user-handlers.d.ts.map +1 -0
- package/build/handlers/user-handlers.js +87 -0
- package/build/handlers/user-handlers.js.map +1 -0
- package/build/index.d.ts +3 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +119 -0
- package/build/index.js.map +1 -0
- package/build/tools/definitions.d.ts +326 -0
- package/build/tools/definitions.d.ts.map +1 -0
- package/build/tools/definitions.js +255 -0
- package/build/tools/definitions.js.map +1 -0
- package/build/utils/api-client.d.ts +13 -0
- package/build/utils/api-client.d.ts.map +1 -0
- package/build/utils/api-client.js +70 -0
- package/build/utils/api-client.js.map +1 -0
- package/build/utils/formatters.d.ts +23 -0
- package/build/utils/formatters.d.ts.map +1 -0
- package/build/utils/formatters.js +244 -0
- package/build/utils/formatters.js.map +1 -0
- package/package.json +55 -0
package/README.md
ADDED
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
# Jira MCP Server
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@nexus2520/jira-mcp-server)
|
|
4
|
+
|
|
5
|
+
A Model Context Protocol (MCP) server for Jira API integration. This server enables AI assistants like Claude to interact with Jira Cloud instances for issue management, search, comments, and workflow transitions.
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
- **Issue Management**: Get, create, update, and assign Jira issues with custom field support
|
|
10
|
+
- **JQL Search**: Search issues using Jira Query Language
|
|
11
|
+
- **Comments**: Add and retrieve comments on issues (supports mentions and links)
|
|
12
|
+
- **Workflow**: Get available transitions and change issue status
|
|
13
|
+
- **Metadata Discovery**: Get field requirements and allowed values for projects
|
|
14
|
+
- **User Search**: Find users by email or name for assignments
|
|
15
|
+
- **Projects**: List all accessible projects
|
|
16
|
+
- **API Token Authentication**: Secure authentication using email + API token
|
|
17
|
+
|
|
18
|
+
## Installation
|
|
19
|
+
|
|
20
|
+
### Using npm (Recommended)
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npm install -g @nexus2520/jira-mcp-server
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### From Source
|
|
27
|
+
|
|
28
|
+
1. **Clone the repository**:
|
|
29
|
+
```bash
|
|
30
|
+
git clone https://github.com/pdogra1299/jira-mcp-server.git
|
|
31
|
+
cd jira-mcp-server
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
2. **Install dependencies**:
|
|
35
|
+
```bash
|
|
36
|
+
pnpm install
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
3. **Build the project**:
|
|
40
|
+
```bash
|
|
41
|
+
pnpm run build
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Prerequisites
|
|
45
|
+
|
|
46
|
+
- Node.js >= 16.0.0
|
|
47
|
+
- A Jira Cloud account with API access
|
|
48
|
+
- Jira API token (generate from [Atlassian Account Settings](https://id.atlassian.com/manage-profile/security/api-tokens))
|
|
49
|
+
|
|
50
|
+
## Configuration
|
|
51
|
+
|
|
52
|
+
### Environment Variables
|
|
53
|
+
|
|
54
|
+
The server requires the following environment variables:
|
|
55
|
+
|
|
56
|
+
- `JIRA_EMAIL`: Your Atlassian account email
|
|
57
|
+
- `JIRA_API_TOKEN`: Your Jira API token
|
|
58
|
+
- `JIRA_BASE_URL`: Your Jira instance URL (e.g., `https://yourcompany.atlassian.net`)
|
|
59
|
+
|
|
60
|
+
### Claude Desktop Configuration
|
|
61
|
+
|
|
62
|
+
Add the following to your Claude Desktop MCP settings file:
|
|
63
|
+
|
|
64
|
+
**Location**:
|
|
65
|
+
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
66
|
+
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
67
|
+
- Linux: `~/.config/Claude/claude_desktop_config.json`
|
|
68
|
+
|
|
69
|
+
**Configuration (if installed via npm)**:
|
|
70
|
+
```json
|
|
71
|
+
{
|
|
72
|
+
"mcpServers": {
|
|
73
|
+
"jira": {
|
|
74
|
+
"command": "npx",
|
|
75
|
+
"args": [
|
|
76
|
+
"-y",
|
|
77
|
+
"@nexus2520/jira-mcp-server"
|
|
78
|
+
],
|
|
79
|
+
"env": {
|
|
80
|
+
"JIRA_EMAIL": "your-email@company.com",
|
|
81
|
+
"JIRA_API_TOKEN": "your-api-token-here",
|
|
82
|
+
"JIRA_BASE_URL": "https://yourcompany.atlassian.net"
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
**Configuration (if built from source)**:
|
|
90
|
+
```json
|
|
91
|
+
{
|
|
92
|
+
"mcpServers": {
|
|
93
|
+
"jira": {
|
|
94
|
+
"name": "jira",
|
|
95
|
+
"command": "node",
|
|
96
|
+
"args": [
|
|
97
|
+
"/absolute/path/to/jira-mcp-server/build/index.js"
|
|
98
|
+
],
|
|
99
|
+
"transport": "stdio",
|
|
100
|
+
"env": {
|
|
101
|
+
"JIRA_EMAIL": "your-email@company.com",
|
|
102
|
+
"JIRA_API_TOKEN": "your-api-token-here",
|
|
103
|
+
"JIRA_BASE_URL": "https://yourcompany.atlassian.net"
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Getting Your Jira API Token
|
|
111
|
+
|
|
112
|
+
1. Go to [Atlassian Account Settings](https://id.atlassian.com/manage-profile/security/api-tokens)
|
|
113
|
+
2. Click "Create API token"
|
|
114
|
+
3. Give it a label (e.g., "Claude MCP")
|
|
115
|
+
4. Copy the generated token
|
|
116
|
+
5. Use it in your configuration
|
|
117
|
+
|
|
118
|
+
## Available Tools
|
|
119
|
+
|
|
120
|
+
### Issue Management
|
|
121
|
+
|
|
122
|
+
#### `get_issue`
|
|
123
|
+
Get detailed information about a Jira issue.
|
|
124
|
+
|
|
125
|
+
**Parameters**:
|
|
126
|
+
- `issueKey` (required): The issue key (e.g., "PROJ-123")
|
|
127
|
+
|
|
128
|
+
**Example**:
|
|
129
|
+
```
|
|
130
|
+
Get details for issue PROJ-123
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
#### `create_issue`
|
|
134
|
+
Create a new Jira issue.
|
|
135
|
+
|
|
136
|
+
**Important**: Always use `get_create_metadata` first to discover required fields, custom fields, and allowed values.
|
|
137
|
+
|
|
138
|
+
**Parameters**:
|
|
139
|
+
- `projectKey` (required): Project key (e.g., "PROJ", "DEV")
|
|
140
|
+
- `summary` (required): Issue title
|
|
141
|
+
- `issueType` (required): Type (e.g., "Bug", "Task", "Story")
|
|
142
|
+
- `description` (optional): Issue description
|
|
143
|
+
- `priority` (optional): Priority name
|
|
144
|
+
- `assignee` (optional): Assignee account ID or email
|
|
145
|
+
- `labels` (optional): Array of labels
|
|
146
|
+
- `customFields` (optional): Custom fields object
|
|
147
|
+
|
|
148
|
+
**Example**:
|
|
149
|
+
```
|
|
150
|
+
Create a bug in project PROJ with summary "Login button not working" and description "Users cannot log in"
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
#### `update_issue`
|
|
154
|
+
Update fields of an existing issue.
|
|
155
|
+
|
|
156
|
+
**Tip**: Use `get_create_metadata` to discover available custom fields and their allowed values.
|
|
157
|
+
|
|
158
|
+
**Parameters**:
|
|
159
|
+
- `issueKey` (required): Issue to update
|
|
160
|
+
- `summary` (optional): New summary
|
|
161
|
+
- `description` (optional): New description
|
|
162
|
+
- `priority` (optional): New priority
|
|
163
|
+
- `assignee` (optional): New assignee
|
|
164
|
+
- `labels` (optional): New labels array
|
|
165
|
+
- `customFields` (optional): Custom fields object
|
|
166
|
+
|
|
167
|
+
#### `assign_issue`
|
|
168
|
+
Assign an issue to a user.
|
|
169
|
+
|
|
170
|
+
**Parameters**:
|
|
171
|
+
- `issueKey` (required): Issue to assign
|
|
172
|
+
- `assignee` (required): User account ID, email, or "-1" to unassign
|
|
173
|
+
|
|
174
|
+
### Metadata & Discovery
|
|
175
|
+
|
|
176
|
+
#### `get_create_metadata`
|
|
177
|
+
Get field requirements and metadata for creating issues in a project.
|
|
178
|
+
|
|
179
|
+
**Parameters**:
|
|
180
|
+
- `projectKey` (required): Project key
|
|
181
|
+
- `issueType` (optional): Filter by specific issue type
|
|
182
|
+
|
|
183
|
+
#### `search_users`
|
|
184
|
+
Search for users by name or email to get their account ID.
|
|
185
|
+
|
|
186
|
+
**Parameters**:
|
|
187
|
+
- `query` (required): Search query (email or name)
|
|
188
|
+
- `maxResults` (optional): Max results (default: 50)
|
|
189
|
+
|
|
190
|
+
### Search
|
|
191
|
+
|
|
192
|
+
#### `search_issues`
|
|
193
|
+
Search for issues using JQL. Returns issue keys and titles.
|
|
194
|
+
|
|
195
|
+
**Parameters**:
|
|
196
|
+
- `jql` (required): JQL query string
|
|
197
|
+
- `maxResults` (optional): Max results (default: 50)
|
|
198
|
+
|
|
199
|
+
**Example JQL queries**:
|
|
200
|
+
- `"project = PROJ AND status = Open"`
|
|
201
|
+
- `"assignee = currentUser() AND status != Done"`
|
|
202
|
+
- `"priority = High AND created >= -7d"`
|
|
203
|
+
|
|
204
|
+
#### `list_projects`
|
|
205
|
+
List all accessible projects.
|
|
206
|
+
|
|
207
|
+
**Parameters**:
|
|
208
|
+
- `maxResults` (optional): Max results (default: 50)
|
|
209
|
+
|
|
210
|
+
### Comments
|
|
211
|
+
|
|
212
|
+
#### `add_comment`
|
|
213
|
+
Add a comment to an issue.
|
|
214
|
+
|
|
215
|
+
**Parameters**:
|
|
216
|
+
- `issueKey` (required): Issue to comment on
|
|
217
|
+
- `comment` (required): Comment text
|
|
218
|
+
|
|
219
|
+
#### `get_comments`
|
|
220
|
+
Get all comments for an issue.
|
|
221
|
+
|
|
222
|
+
**Parameters**:
|
|
223
|
+
- `issueKey` (required): Issue key
|
|
224
|
+
|
|
225
|
+
### Workflow Transitions
|
|
226
|
+
|
|
227
|
+
#### `get_transitions`
|
|
228
|
+
Get available status transitions for an issue.
|
|
229
|
+
|
|
230
|
+
**Parameters**:
|
|
231
|
+
- `issueKey` (required): Issue key
|
|
232
|
+
|
|
233
|
+
#### `transition_issue`
|
|
234
|
+
Change the status of an issue.
|
|
235
|
+
|
|
236
|
+
**Parameters**:
|
|
237
|
+
- `issueKey` (required): Issue to transition
|
|
238
|
+
- `transitionId` (required): Transition ID (from get_transitions)
|
|
239
|
+
- `comment` (optional): Comment to add with transition
|
|
240
|
+
|
|
241
|
+
## Usage Examples
|
|
242
|
+
|
|
243
|
+
### With Claude Desktop
|
|
244
|
+
|
|
245
|
+
Once configured, you can interact with Jira naturally:
|
|
246
|
+
|
|
247
|
+
```
|
|
248
|
+
"Show me all open bugs in project PROJ"
|
|
249
|
+
"Create a new task in PROJ with summary 'Update documentation'"
|
|
250
|
+
"Add a comment to PROJ-123 saying 'Fixed in latest release'"
|
|
251
|
+
"What are the available transitions for PROJ-123?"
|
|
252
|
+
"Move PROJ-123 to In Progress"
|
|
253
|
+
"Assign PROJ-123 to john.doe@company.com"
|
|
254
|
+
"Get the required fields for creating issues in PROJ"
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
## Development
|
|
258
|
+
|
|
259
|
+
### Project Structure
|
|
260
|
+
|
|
261
|
+
```
|
|
262
|
+
jira-mcp-server/
|
|
263
|
+
├── src/
|
|
264
|
+
│ ├── index.ts # Main server entry point
|
|
265
|
+
│ ├── utils/
|
|
266
|
+
│ │ ├── api-client.ts # Jira API client
|
|
267
|
+
│ │ └── formatters.ts # Response formatters
|
|
268
|
+
│ ├── handlers/
|
|
269
|
+
│ │ ├── issue-handlers.ts # Issue CRUD operations
|
|
270
|
+
│ │ ├── search-handlers.ts # JQL search
|
|
271
|
+
│ │ ├── comment-handlers.ts # Comment operations
|
|
272
|
+
│ │ ├── transition-handlers.ts # Workflow transitions
|
|
273
|
+
│ │ └── project-handlers.ts # Project operations
|
|
274
|
+
│ └── tools/
|
|
275
|
+
│ └── definitions.ts # MCP tool definitions
|
|
276
|
+
├── build/ # Compiled JavaScript output
|
|
277
|
+
├── package.json
|
|
278
|
+
├── tsconfig.json
|
|
279
|
+
└── README.md
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
### Build Commands
|
|
283
|
+
|
|
284
|
+
- `pnpm run build` - Compile TypeScript to JavaScript
|
|
285
|
+
- `pnpm run dev` - Watch mode for development
|
|
286
|
+
- `pnpm start` - Run the compiled server
|
|
287
|
+
|
|
288
|
+
### API Reference
|
|
289
|
+
|
|
290
|
+
This server uses the [Jira REST API v3](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/).
|
|
291
|
+
|
|
292
|
+
## Troubleshooting
|
|
293
|
+
|
|
294
|
+
### "Error: JIRA_EMAIL and JIRA_API_TOKEN are required"
|
|
295
|
+
|
|
296
|
+
Make sure you've set the environment variables in your MCP configuration.
|
|
297
|
+
|
|
298
|
+
### Authentication errors
|
|
299
|
+
|
|
300
|
+
- Verify your API token is correct
|
|
301
|
+
- Ensure your email matches your Atlassian account
|
|
302
|
+
- Check that your JIRA_BASE_URL doesn't have a trailing slash
|
|
303
|
+
|
|
304
|
+
### Permission errors
|
|
305
|
+
|
|
306
|
+
The API token uses the permissions of the user who created it. Make sure your account has the necessary permissions for the actions you're trying to perform.
|
|
307
|
+
|
|
308
|
+
## License
|
|
309
|
+
|
|
310
|
+
MIT
|
|
311
|
+
|
|
312
|
+
## Author
|
|
313
|
+
|
|
314
|
+
Parth Dogra
|
|
315
|
+
|
|
316
|
+
## Contributing
|
|
317
|
+
|
|
318
|
+
Feel free to open issues or submit pull requests for improvements!
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { JiraApiClient } from '../utils/api-client.js';
|
|
2
|
+
export declare class CommentHandlers {
|
|
3
|
+
private apiClient;
|
|
4
|
+
constructor(apiClient: JiraApiClient);
|
|
5
|
+
handleAddComment(args: any): Promise<{
|
|
6
|
+
content: {
|
|
7
|
+
type: string;
|
|
8
|
+
text: string;
|
|
9
|
+
}[];
|
|
10
|
+
isError?: undefined;
|
|
11
|
+
} | {
|
|
12
|
+
content: {
|
|
13
|
+
type: string;
|
|
14
|
+
text: string;
|
|
15
|
+
}[];
|
|
16
|
+
isError: boolean;
|
|
17
|
+
}>;
|
|
18
|
+
handleGetComments(args: any): Promise<{
|
|
19
|
+
content: {
|
|
20
|
+
type: string;
|
|
21
|
+
text: string;
|
|
22
|
+
}[];
|
|
23
|
+
isError?: undefined;
|
|
24
|
+
} | {
|
|
25
|
+
content: {
|
|
26
|
+
type: string;
|
|
27
|
+
text: string;
|
|
28
|
+
}[];
|
|
29
|
+
isError: boolean;
|
|
30
|
+
}>;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=comment-handlers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comment-handlers.d.ts","sourceRoot":"","sources":["../../src/handlers/comment-handlers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAGvD,qBAAa,eAAe;IACd,OAAO,CAAC,SAAS;gBAAT,SAAS,EAAE,aAAa;IAEtC,gBAAgB,CAAC,IAAI,EAAE,GAAG;;;;;;;;;;;;;IA2D1B,iBAAiB,CAAC,IAAI,EAAE,GAAG;;;;;;;;;;;;;CA8BlC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { JiraFormatters } from '../utils/formatters.js';
|
|
2
|
+
export class CommentHandlers {
|
|
3
|
+
apiClient;
|
|
4
|
+
constructor(apiClient) {
|
|
5
|
+
this.apiClient = apiClient;
|
|
6
|
+
}
|
|
7
|
+
async handleAddComment(args) {
|
|
8
|
+
try {
|
|
9
|
+
const { issueKey, comment } = args;
|
|
10
|
+
if (!issueKey || !comment) {
|
|
11
|
+
throw new Error('issueKey and comment are required');
|
|
12
|
+
}
|
|
13
|
+
// Handle comment body - convert to ADF format if it's plain text
|
|
14
|
+
let commentBody;
|
|
15
|
+
if (typeof comment === 'string') {
|
|
16
|
+
// Convert plain text to Atlassian Document Format
|
|
17
|
+
commentBody = {
|
|
18
|
+
type: 'doc',
|
|
19
|
+
version: 1,
|
|
20
|
+
content: [
|
|
21
|
+
{
|
|
22
|
+
type: 'paragraph',
|
|
23
|
+
content: [
|
|
24
|
+
{
|
|
25
|
+
type: 'text',
|
|
26
|
+
text: comment,
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
// Already in ADF format
|
|
35
|
+
commentBody = comment;
|
|
36
|
+
}
|
|
37
|
+
const commentData = {
|
|
38
|
+
body: commentBody,
|
|
39
|
+
};
|
|
40
|
+
const result = await this.apiClient.post(`/issue/${issueKey}/comment`, commentData);
|
|
41
|
+
return {
|
|
42
|
+
content: [
|
|
43
|
+
{
|
|
44
|
+
type: 'text',
|
|
45
|
+
text: `✅ Comment added to ${issueKey} successfully!\n\n**Comment ID**: ${result.id}`,
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
catch (error) {
|
|
51
|
+
return {
|
|
52
|
+
content: [
|
|
53
|
+
{
|
|
54
|
+
type: 'text',
|
|
55
|
+
text: JiraFormatters.formatError(error),
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
isError: true,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
async handleGetComments(args) {
|
|
63
|
+
try {
|
|
64
|
+
const { issueKey } = args;
|
|
65
|
+
if (!issueKey) {
|
|
66
|
+
throw new Error('issueKey is required');
|
|
67
|
+
}
|
|
68
|
+
const result = await this.apiClient.get(`/issue/${issueKey}/comment`);
|
|
69
|
+
return {
|
|
70
|
+
content: [
|
|
71
|
+
{
|
|
72
|
+
type: 'text',
|
|
73
|
+
text: JiraFormatters.formatComments(result),
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
catch (error) {
|
|
79
|
+
return {
|
|
80
|
+
content: [
|
|
81
|
+
{
|
|
82
|
+
type: 'text',
|
|
83
|
+
text: JiraFormatters.formatError(error),
|
|
84
|
+
},
|
|
85
|
+
],
|
|
86
|
+
isError: true,
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=comment-handlers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comment-handlers.js","sourceRoot":"","sources":["../../src/handlers/comment-handlers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,OAAO,eAAe;IACN;IAApB,YAAoB,SAAwB;QAAxB,cAAS,GAAT,SAAS,CAAe;IAAG,CAAC;IAEhD,KAAK,CAAC,gBAAgB,CAAC,IAAS;QAC9B,IAAI,CAAC;YACH,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;YAEnC,IAAI,CAAC,QAAQ,IAAI,CAAC,OAAO,EAAE,CAAC;gBAC1B,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;YACvD,CAAC;YAED,iEAAiE;YACjE,IAAI,WAAW,CAAC;YAChB,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;gBAChC,kDAAkD;gBAClD,WAAW,GAAG;oBACZ,IAAI,EAAE,KAAK;oBACX,OAAO,EAAE,CAAC;oBACV,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,WAAW;4BACjB,OAAO,EAAE;gCACP;oCACE,IAAI,EAAE,MAAM;oCACZ,IAAI,EAAE,OAAO;iCACd;6BACF;yBACF;qBACF;iBACF,CAAC;YACJ,CAAC;iBAAM,CAAC;gBACN,wBAAwB;gBACxB,WAAW,GAAG,OAAO,CAAC;YACxB,CAAC;YAED,MAAM,WAAW,GAAG;gBAClB,IAAI,EAAE,WAAW;aAClB,CAAC;YAEF,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,QAAQ,UAAU,EAAE,WAAW,CAAC,CAAC;YAEpF,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,sBAAsB,QAAQ,qCAAqC,MAAM,CAAC,EAAE,EAAE;qBACrF;iBACF;aACF,CAAC;QACJ,CAAC;QAAC,OAAO,KAAU,EAAE,CAAC;YACpB,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,cAAc,CAAC,WAAW,CAAC,KAAK,CAAC;qBACxC;iBACF;gBACD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC;IAED,KAAK,CAAC,iBAAiB,CAAC,IAAS;QAC/B,IAAI,CAAC;YACH,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;YAE1B,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACd,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;YAC1C,CAAC;YAED,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,QAAQ,UAAU,CAAC,CAAC;YAEtE,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,cAAc,CAAC,cAAc,CAAC,MAAM,CAAC;qBAC5C;iBACF;aACF,CAAC;QACJ,CAAC;QAAC,OAAO,KAAU,EAAE,CAAC;YACpB,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,cAAc,CAAC,WAAW,CAAC,KAAK,CAAC;qBACxC;iBACF;gBACD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { JiraApiClient } from '../utils/api-client.js';
|
|
2
|
+
import { UserHandlers } from './user-handlers.js';
|
|
3
|
+
export declare class IssueHandlers {
|
|
4
|
+
private apiClient;
|
|
5
|
+
private userHandlers;
|
|
6
|
+
private fieldMetadataCache;
|
|
7
|
+
constructor(apiClient: JiraApiClient, userHandlers: UserHandlers);
|
|
8
|
+
/**
|
|
9
|
+
* Fetch and cache field metadata (field ID -> display name mapping)
|
|
10
|
+
*/
|
|
11
|
+
private getFieldMetadata;
|
|
12
|
+
handleGetIssue(args: any): Promise<{
|
|
13
|
+
content: {
|
|
14
|
+
type: string;
|
|
15
|
+
text: string;
|
|
16
|
+
}[];
|
|
17
|
+
isError?: undefined;
|
|
18
|
+
} | {
|
|
19
|
+
content: {
|
|
20
|
+
type: string;
|
|
21
|
+
text: string;
|
|
22
|
+
}[];
|
|
23
|
+
isError: boolean;
|
|
24
|
+
}>;
|
|
25
|
+
handleCreateIssue(args: any): Promise<{
|
|
26
|
+
content: {
|
|
27
|
+
type: string;
|
|
28
|
+
text: string;
|
|
29
|
+
}[];
|
|
30
|
+
isError?: undefined;
|
|
31
|
+
} | {
|
|
32
|
+
content: {
|
|
33
|
+
type: string;
|
|
34
|
+
text: string;
|
|
35
|
+
}[];
|
|
36
|
+
isError: boolean;
|
|
37
|
+
}>;
|
|
38
|
+
handleUpdateIssue(args: any): Promise<{
|
|
39
|
+
content: {
|
|
40
|
+
type: string;
|
|
41
|
+
text: string;
|
|
42
|
+
}[];
|
|
43
|
+
isError?: undefined;
|
|
44
|
+
} | {
|
|
45
|
+
content: {
|
|
46
|
+
type: string;
|
|
47
|
+
text: string;
|
|
48
|
+
}[];
|
|
49
|
+
isError: boolean;
|
|
50
|
+
}>;
|
|
51
|
+
handleAssignIssue(args: any): Promise<{
|
|
52
|
+
content: {
|
|
53
|
+
type: string;
|
|
54
|
+
text: string;
|
|
55
|
+
}[];
|
|
56
|
+
isError?: undefined;
|
|
57
|
+
} | {
|
|
58
|
+
content: {
|
|
59
|
+
type: string;
|
|
60
|
+
text: string;
|
|
61
|
+
}[];
|
|
62
|
+
isError: boolean;
|
|
63
|
+
}>;
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=issue-handlers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"issue-handlers.d.ts","sourceRoot":"","sources":["../../src/handlers/issue-handlers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,qBAAa,aAAa;IAGZ,OAAO,CAAC,SAAS;IAAiB,OAAO,CAAC,YAAY;IAFlE,OAAO,CAAC,kBAAkB,CAAoC;gBAE1C,SAAS,EAAE,aAAa,EAAU,YAAY,EAAE,YAAY;IAEhF;;OAEG;YACW,gBAAgB;IAuBxB,cAAc,CAAC,IAAI,EAAE,GAAG;;;;;;;;;;;;;IAgCxB,iBAAiB,CAAC,IAAI,EAAE,GAAG;;;;;;;;;;;;;IAmF3B,iBAAiB,CAAC,IAAI,EAAE,GAAG;;;;;;;;;;;;;IA+E3B,iBAAiB,CAAC,IAAI,EAAE,GAAG;;;;;;;;;;;;;CA2ClC"}
|