@andrebuzeli/git-mcp 2.28.1 → 2.29.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/dist/client.d.ts +306 -306
- package/dist/client.js +298 -298
- package/dist/config.d.ts +310 -310
- package/dist/config.js +392 -392
- package/dist/index.d.ts +22 -22
- package/dist/index.js +89 -89
- package/dist/providers/base-provider.d.ts +160 -160
- package/dist/providers/base-provider.js +274 -274
- package/dist/providers/error-handler.d.ts +74 -50
- package/dist/providers/error-handler.d.ts.map +1 -1
- package/dist/providers/error-handler.js +234 -175
- package/dist/providers/error-handler.js.map +1 -1
- package/dist/providers/gitea-provider.d.ts +97 -97
- package/dist/providers/gitea-provider.d.ts.map +1 -1
- package/dist/providers/gitea-provider.js +1015 -1001
- package/dist/providers/gitea-provider.js.map +1 -1
- package/dist/providers/github-provider.d.ts +104 -104
- package/dist/providers/github-provider.d.ts.map +1 -1
- package/dist/providers/github-provider.js +1248 -1234
- package/dist/providers/github-provider.js.map +1 -1
- package/dist/providers/index.d.ts +12 -12
- package/dist/providers/index.js +40 -40
- package/dist/providers/provider-factory.d.ts +74 -74
- package/dist/providers/provider-factory.d.ts.map +1 -1
- package/dist/providers/provider-factory.js +318 -311
- package/dist/providers/provider-factory.js.map +1 -1
- package/dist/providers/types.d.ts +318 -318
- package/dist/providers/types.js +6 -6
- package/dist/server.d.ts +76 -76
- package/dist/server.js +306 -306
- package/dist/server.js.map +1 -1
- package/dist/tools/git-archive.d.ts +169 -165
- package/dist/tools/git-archive.d.ts.map +1 -1
- package/dist/tools/git-archive.js +246 -233
- package/dist/tools/git-archive.js.map +1 -1
- package/dist/tools/git-branches.d.ts +434 -430
- package/dist/tools/git-branches.d.ts.map +1 -1
- package/dist/tools/git-branches.js +640 -627
- package/dist/tools/git-branches.js.map +1 -1
- package/dist/tools/git-commits.d.ts +489 -485
- package/dist/tools/git-commits.d.ts.map +1 -1
- package/dist/tools/git-commits.js +748 -735
- package/dist/tools/git-commits.js.map +1 -1
- package/dist/tools/git-config.d.ts +144 -140
- package/dist/tools/git-config.d.ts.map +1 -1
- package/dist/tools/git-config.js +281 -268
- package/dist/tools/git-config.js.map +1 -1
- package/dist/tools/git-files.d.ts +490 -486
- package/dist/tools/git-files.d.ts.map +1 -1
- package/dist/tools/git-files.js +620 -607
- package/dist/tools/git-files.js.map +1 -1
- package/dist/tools/git-initialize.d.ts +46 -42
- package/dist/tools/git-initialize.d.ts.map +1 -1
- package/dist/tools/git-initialize.js +81 -68
- package/dist/tools/git-initialize.js.map +1 -1
- package/dist/tools/git-issues.d.ts +578 -571
- package/dist/tools/git-issues.d.ts.map +1 -1
- package/dist/tools/git-issues.js +754 -740
- package/dist/tools/git-issues.js.map +1 -1
- package/dist/tools/git-pulls.d.ts +701 -694
- package/dist/tools/git-pulls.d.ts.map +1 -1
- package/dist/tools/git-pulls.js +746 -732
- package/dist/tools/git-pulls.js.map +1 -1
- package/dist/tools/git-releases.d.ts +494 -487
- package/dist/tools/git-releases.d.ts.map +1 -1
- package/dist/tools/git-releases.js +571 -557
- package/dist/tools/git-releases.js.map +1 -1
- package/dist/tools/git-remote.d.ts +142 -138
- package/dist/tools/git-remote.d.ts.map +1 -1
- package/dist/tools/git-remote.js +287 -274
- package/dist/tools/git-remote.js.map +1 -1
- package/dist/tools/git-repositories.d.ts +487 -483
- package/dist/tools/git-repositories.d.ts.map +1 -1
- package/dist/tools/git-repositories.js +653 -640
- package/dist/tools/git-repositories.js.map +1 -1
- package/dist/tools/git-reset.d.ts +134 -130
- package/dist/tools/git-reset.d.ts.map +1 -1
- package/dist/tools/git-reset.js +236 -223
- package/dist/tools/git-reset.js.map +1 -1
- package/dist/tools/git-revert.d.ts +153 -149
- package/dist/tools/git-revert.d.ts.map +1 -1
- package/dist/tools/git-revert.js +211 -198
- package/dist/tools/git-revert.js.map +1 -1
- package/dist/tools/git-stash.d.ts +144 -140
- package/dist/tools/git-stash.d.ts.map +1 -1
- package/dist/tools/git-stash.js +282 -269
- package/dist/tools/git-stash.js.map +1 -1
- package/dist/tools/git-sync.d.ts +182 -178
- package/dist/tools/git-sync.d.ts.map +1 -1
- package/dist/tools/git-sync.js +325 -312
- package/dist/tools/git-sync.js.map +1 -1
- package/dist/tools/git-tags.d.ts +418 -411
- package/dist/tools/git-tags.d.ts.map +1 -1
- package/dist/tools/git-tags.js +499 -485
- package/dist/tools/git-tags.js.map +1 -1
- package/dist/tools/git-upload-project.d.ts +5 -1
- package/dist/tools/git-upload-project.d.ts.map +1 -1
- package/dist/tools/git-upload-project.js +21 -1
- package/dist/tools/git-upload-project.js.map +1 -1
- package/dist/tools/git-webhooks.d.ts +477 -470
- package/dist/tools/git-webhooks.d.ts.map +1 -1
- package/dist/tools/git-webhooks.js +561 -543
- package/dist/tools/git-webhooks.js.map +1 -1
- package/dist/utils/git-error-analyzer.d.ts +64 -0
- package/dist/utils/git-error-analyzer.d.ts.map +1 -0
- package/dist/utils/git-error-analyzer.js +286 -0
- package/dist/utils/git-error-analyzer.js.map +1 -0
- package/dist/utils/terminal-controller.d.ts +80 -80
- package/dist/utils/terminal-controller.js +345 -345
- package/dist/utils/user-detection.d.ts +24 -24
- package/dist/utils/user-detection.js +53 -53
- package/package.json +2 -2
- package/dist/tools/gh-actions.d.ts +0 -253
- package/dist/tools/gh-actions.d.ts.map +0 -1
- package/dist/tools/gh-actions.js +0 -390
- package/dist/tools/gh-actions.js.map +0 -1
- package/dist/tools/gh-analytics.d.ts +0 -264
- package/dist/tools/gh-analytics.d.ts.map +0 -1
- package/dist/tools/gh-analytics.js +0 -402
- package/dist/tools/gh-analytics.js.map +0 -1
- package/dist/tools/gh-code-review.d.ts +0 -305
- package/dist/tools/gh-code-review.d.ts.map +0 -1
- package/dist/tools/gh-code-review.js +0 -513
- package/dist/tools/gh-code-review.js.map +0 -1
- package/dist/tools/gh-codespaces.d.ts +0 -139
- package/dist/tools/gh-codespaces.d.ts.map +0 -1
- package/dist/tools/gh-codespaces.js +0 -283
- package/dist/tools/gh-codespaces.js.map +0 -1
- package/dist/tools/gh-deployments.d.ts +0 -301
- package/dist/tools/gh-deployments.d.ts.map +0 -1
- package/dist/tools/gh-deployments.js +0 -368
- package/dist/tools/gh-deployments.js.map +0 -1
- package/dist/tools/gh-gists.d.ts +0 -175
- package/dist/tools/gh-gists.d.ts.map +0 -1
- package/dist/tools/gh-gists.js +0 -322
- package/dist/tools/gh-gists.js.map +0 -1
- package/dist/tools/gh-projects.d.ts +0 -206
- package/dist/tools/gh-projects.d.ts.map +0 -1
- package/dist/tools/gh-projects.js +0 -359
- package/dist/tools/gh-projects.js.map +0 -1
- package/dist/tools/gh-security.d.ts +0 -275
- package/dist/tools/gh-security.d.ts.map +0 -1
- package/dist/tools/gh-security.js +0 -396
- package/dist/tools/gh-security.js.map +0 -1
- package/dist/tools/gh-sync.d.ts +0 -214
- package/dist/tools/gh-sync.d.ts.map +0 -1
- package/dist/tools/gh-sync.js +0 -379
- package/dist/tools/gh-sync.js.map +0 -1
- package/dist/tools/gh-workflows.d.ts +0 -291
- package/dist/tools/gh-workflows.d.ts.map +0 -1
- package/dist/tools/gh-workflows.js +0 -433
- package/dist/tools/gh-workflows.js.map +0 -1
- package/dist/tools/git-bundle.d.ts +0 -172
- package/dist/tools/git-bundle.d.ts.map +0 -1
- package/dist/tools/git-bundle.js +0 -242
- package/dist/tools/git-bundle.js.map +0 -1
- package/dist/tools/git-cherry-pick.d.ts +0 -159
- package/dist/tools/git-cherry-pick.d.ts.map +0 -1
- package/dist/tools/git-cherry-pick.js +0 -225
- package/dist/tools/git-cherry-pick.js.map +0 -1
- package/dist/tools/git-rebase.d.ts +0 -138
- package/dist/tools/git-rebase.d.ts.map +0 -1
- package/dist/tools/git-rebase.js +0 -214
- package/dist/tools/git-rebase.js.map +0 -1
- package/dist/tools/git-submodule.d.ts +0 -153
- package/dist/tools/git-submodule.d.ts.map +0 -1
- package/dist/tools/git-submodule.js +0 -290
- package/dist/tools/git-submodule.js.map +0 -1
- package/dist/tools/git-worktree.d.ts +0 -160
- package/dist/tools/git-worktree.d.ts.map +0 -1
- package/dist/tools/git-worktree.js +0 -270
- package/dist/tools/git-worktree.js.map +0 -1
- package/dist/tools/repositories.d.ts +0 -406
- package/dist/tools/repositories.d.ts.map +0 -1
- package/dist/tools/repositories.js +0 -570
- package/dist/tools/repositories.js.map +0 -1
- package/dist/tools/users.d.ts +0 -373
- package/dist/tools/users.d.ts.map +0 -1
- package/dist/tools/users.js +0 -500
- package/dist/tools/users.js.map +0 -1
- package/dist/tools/validator.d.ts +0 -171
- package/dist/tools/validator.d.ts.map +0 -1
- package/dist/tools/validator.js +0 -195
- package/dist/tools/validator.js.map +0 -1
- package/dist/tools/version-control.d.ts +0 -137
- package/dist/tools/version-control.d.ts.map +0 -1
- package/dist/tools/version-control.js +0 -165
- package/dist/tools/version-control.js.map +0 -1
package/dist/tools/git-issues.js
CHANGED
|
@@ -1,741 +1,755 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.issuesTool = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const index_js_1 = require("../providers/index.js");
|
|
6
|
-
const user_detection_js_1 = require("../utils/user-detection.js");
|
|
7
|
-
/**
|
|
8
|
-
* Tool: issues
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* Gerenciamento completo de issues com suporte multi-provider (GitHub e Gitea)
|
|
12
|
-
*
|
|
13
|
-
* FUNCIONALIDADES:
|
|
14
|
-
* -
|
|
15
|
-
* - Listagem e busca de issues
|
|
16
|
-
* -
|
|
17
|
-
* -
|
|
18
|
-
* - Fechamento de issues
|
|
19
|
-
* -
|
|
20
|
-
* - Busca por
|
|
21
|
-
*
|
|
22
|
-
* USO:
|
|
23
|
-
* - Para gerenciar bugs e features
|
|
24
|
-
* - Para acompanhar progresso de desenvolvimento
|
|
25
|
-
* - Para
|
|
26
|
-
* - Para controle de qualidade
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* - Use
|
|
30
|
-
* - Documente detalhes completos
|
|
31
|
-
* - Atualize status regularmente
|
|
32
|
-
* - Use labels adequadamente
|
|
33
|
-
*/
|
|
34
|
-
/**
|
|
35
|
-
* Schema de
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* - action:
|
|
39
|
-
* -
|
|
40
|
-
* -
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
* - Sempre valide entrada antes de usar
|
|
44
|
-
* - Use
|
|
45
|
-
* - Documente
|
|
46
|
-
*/
|
|
47
|
-
const IssuesInputSchema = zod_1.z.object({
|
|
48
|
-
action: zod_1.z.enum(['create', 'list', 'get', 'update', 'close', 'comment', 'search']),
|
|
49
|
-
//
|
|
50
|
-
repo: zod_1.z.string(),
|
|
51
|
-
// Para multi-provider
|
|
52
|
-
provider: zod_1.z.enum(['gitea', 'github']).describe('Provider to use (gitea or github)'), // Provider
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
* -
|
|
86
|
-
* -
|
|
87
|
-
* -
|
|
88
|
-
* -
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
* -
|
|
109
|
-
* -
|
|
110
|
-
* -
|
|
111
|
-
* -
|
|
112
|
-
* -
|
|
113
|
-
* -
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
* -
|
|
119
|
-
* -
|
|
120
|
-
* -
|
|
121
|
-
* -
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
* -
|
|
127
|
-
* -
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
* -
|
|
133
|
-
* -
|
|
134
|
-
* -
|
|
135
|
-
* -
|
|
136
|
-
* -
|
|
137
|
-
* -
|
|
138
|
-
* -
|
|
139
|
-
* -
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
* -
|
|
145
|
-
* -
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
* -
|
|
151
|
-
* -
|
|
152
|
-
* -
|
|
153
|
-
*
|
|
154
|
-
*
|
|
155
|
-
*
|
|
156
|
-
*
|
|
157
|
-
* -
|
|
158
|
-
* -
|
|
159
|
-
* -
|
|
160
|
-
* -
|
|
161
|
-
* -
|
|
162
|
-
*
|
|
163
|
-
*
|
|
164
|
-
*
|
|
165
|
-
* -
|
|
166
|
-
* -
|
|
167
|
-
* -
|
|
168
|
-
* -
|
|
169
|
-
* -
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
*
|
|
210
|
-
*
|
|
211
|
-
*
|
|
212
|
-
* -
|
|
213
|
-
* -
|
|
214
|
-
* -
|
|
215
|
-
*
|
|
216
|
-
*
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
*
|
|
220
|
-
*
|
|
221
|
-
*
|
|
222
|
-
*
|
|
223
|
-
*
|
|
224
|
-
*
|
|
225
|
-
*
|
|
226
|
-
* -
|
|
227
|
-
* -
|
|
228
|
-
*
|
|
229
|
-
*
|
|
230
|
-
*
|
|
231
|
-
* -
|
|
232
|
-
* -
|
|
233
|
-
* -
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
provider
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
*
|
|
297
|
-
*
|
|
298
|
-
*
|
|
299
|
-
* -
|
|
300
|
-
* -
|
|
301
|
-
*
|
|
302
|
-
*
|
|
303
|
-
*
|
|
304
|
-
* -
|
|
305
|
-
* -
|
|
306
|
-
*
|
|
307
|
-
*
|
|
308
|
-
*
|
|
309
|
-
* -
|
|
310
|
-
* -
|
|
311
|
-
* -
|
|
312
|
-
*
|
|
313
|
-
*
|
|
314
|
-
*
|
|
315
|
-
* -
|
|
316
|
-
* -
|
|
317
|
-
* -
|
|
318
|
-
*
|
|
319
|
-
*
|
|
320
|
-
*
|
|
321
|
-
* -
|
|
322
|
-
* -
|
|
323
|
-
* -
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
*
|
|
351
|
-
*
|
|
352
|
-
*
|
|
353
|
-
* -
|
|
354
|
-
* -
|
|
355
|
-
*
|
|
356
|
-
*
|
|
357
|
-
*
|
|
358
|
-
* -
|
|
359
|
-
*
|
|
360
|
-
*
|
|
361
|
-
*
|
|
362
|
-
* -
|
|
363
|
-
* -
|
|
364
|
-
*
|
|
365
|
-
*
|
|
366
|
-
*
|
|
367
|
-
* -
|
|
368
|
-
* -
|
|
369
|
-
* -
|
|
370
|
-
*
|
|
371
|
-
*
|
|
372
|
-
*
|
|
373
|
-
* -
|
|
374
|
-
* -
|
|
375
|
-
* -
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
const
|
|
387
|
-
const
|
|
388
|
-
const
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
*
|
|
409
|
-
*
|
|
410
|
-
*
|
|
411
|
-
* -
|
|
412
|
-
* -
|
|
413
|
-
*
|
|
414
|
-
*
|
|
415
|
-
*
|
|
416
|
-
* -
|
|
417
|
-
* -
|
|
418
|
-
*
|
|
419
|
-
*
|
|
420
|
-
*
|
|
421
|
-
* -
|
|
422
|
-
* -
|
|
423
|
-
*
|
|
424
|
-
*
|
|
425
|
-
*
|
|
426
|
-
* -
|
|
427
|
-
* -
|
|
428
|
-
* -
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
*
|
|
457
|
-
*
|
|
458
|
-
*
|
|
459
|
-
* -
|
|
460
|
-
* -
|
|
461
|
-
*
|
|
462
|
-
*
|
|
463
|
-
*
|
|
464
|
-
* -
|
|
465
|
-
* -
|
|
466
|
-
*
|
|
467
|
-
*
|
|
468
|
-
*
|
|
469
|
-
* -
|
|
470
|
-
* -
|
|
471
|
-
* -
|
|
472
|
-
* -
|
|
473
|
-
* -
|
|
474
|
-
*
|
|
475
|
-
*
|
|
476
|
-
*
|
|
477
|
-
* -
|
|
478
|
-
* -
|
|
479
|
-
*
|
|
480
|
-
*
|
|
481
|
-
*
|
|
482
|
-
* -
|
|
483
|
-
* -
|
|
484
|
-
* -
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
*
|
|
528
|
-
*
|
|
529
|
-
*
|
|
530
|
-
* -
|
|
531
|
-
* -
|
|
532
|
-
*
|
|
533
|
-
*
|
|
534
|
-
*
|
|
535
|
-
* -
|
|
536
|
-
* -
|
|
537
|
-
*
|
|
538
|
-
*
|
|
539
|
-
*
|
|
540
|
-
* -
|
|
541
|
-
* - Issue deve
|
|
542
|
-
*
|
|
543
|
-
*
|
|
544
|
-
*
|
|
545
|
-
* -
|
|
546
|
-
* -
|
|
547
|
-
* -
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
*
|
|
575
|
-
*
|
|
576
|
-
*
|
|
577
|
-
* -
|
|
578
|
-
* -
|
|
579
|
-
*
|
|
580
|
-
*
|
|
581
|
-
*
|
|
582
|
-
* -
|
|
583
|
-
* -
|
|
584
|
-
* -
|
|
585
|
-
*
|
|
586
|
-
*
|
|
587
|
-
*
|
|
588
|
-
* -
|
|
589
|
-
* -
|
|
590
|
-
*
|
|
591
|
-
*
|
|
592
|
-
*
|
|
593
|
-
* -
|
|
594
|
-
* -
|
|
595
|
-
* -
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
*
|
|
642
|
-
*
|
|
643
|
-
*
|
|
644
|
-
* -
|
|
645
|
-
* -
|
|
646
|
-
*
|
|
647
|
-
*
|
|
648
|
-
*
|
|
649
|
-
* -
|
|
650
|
-
* -
|
|
651
|
-
*
|
|
652
|
-
*
|
|
653
|
-
*
|
|
654
|
-
* -
|
|
655
|
-
* -
|
|
656
|
-
*
|
|
657
|
-
*
|
|
658
|
-
*
|
|
659
|
-
* -
|
|
660
|
-
* -
|
|
661
|
-
*
|
|
662
|
-
*
|
|
663
|
-
*
|
|
664
|
-
* -
|
|
665
|
-
* -
|
|
666
|
-
* -
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
const
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
const
|
|
698
|
-
const
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
}
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.issuesTool = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const index_js_1 = require("../providers/index.js");
|
|
6
|
+
const user_detection_js_1 = require("../utils/user-detection.js");
|
|
7
|
+
/**
|
|
8
|
+
* Tool: issues
|
|
9
|
+
*
|
|
10
|
+
* DESCRIÇÃO:
|
|
11
|
+
* Gerenciamento completo de issues com suporte multi-provider (GitHub e Gitea)
|
|
12
|
+
*
|
|
13
|
+
* FUNCIONALIDADES:
|
|
14
|
+
* - Criação de novas issues
|
|
15
|
+
* - Listagem e busca de issues
|
|
16
|
+
* - Obtenção de detalhes especÃficos
|
|
17
|
+
* - Atualização de issues existentes
|
|
18
|
+
* - Fechamento de issues
|
|
19
|
+
* - Adição de comentários
|
|
20
|
+
* - Busca por conteúdo e status
|
|
21
|
+
*
|
|
22
|
+
* USO:
|
|
23
|
+
* - Para gerenciar bugs e features
|
|
24
|
+
* - Para acompanhar progresso de desenvolvimento
|
|
25
|
+
* - Para comunicação entre equipe
|
|
26
|
+
* - Para controle de qualidade
|
|
27
|
+
*
|
|
28
|
+
* RECOMENDAÇÕES:
|
|
29
|
+
* - Use tÃtulos descritivos
|
|
30
|
+
* - Documente detalhes completos
|
|
31
|
+
* - Atualize status regularmente
|
|
32
|
+
* - Use labels adequadamente
|
|
33
|
+
*/
|
|
34
|
+
/**
|
|
35
|
+
* Schema de validação para entrada da tool issues
|
|
36
|
+
*
|
|
37
|
+
* VALIDAÇÕES:
|
|
38
|
+
* - action: Ação obrigatória (create, list, get, update, close, comment, search)
|
|
39
|
+
* - Parâmetros especÃficos por ação
|
|
40
|
+
* - Validação de tipos e formatos
|
|
41
|
+
*
|
|
42
|
+
* RECOMENDAÇÕES:
|
|
43
|
+
* - Sempre valide entrada antes de usar
|
|
44
|
+
* - Use parâmetros opcionais adequadamente
|
|
45
|
+
* - Documente parâmetros obrigatórios
|
|
46
|
+
*/
|
|
47
|
+
const IssuesInputSchema = zod_1.z.object({
|
|
48
|
+
action: zod_1.z.enum(['create', 'list', 'get', 'update', 'close', 'comment', 'search']),
|
|
49
|
+
// Parâmetros comuns
|
|
50
|
+
repo: zod_1.z.string(),
|
|
51
|
+
// Para multi-provider
|
|
52
|
+
provider: zod_1.z.enum(['gitea', 'github']).describe('Provider to use (gitea or github)'), // Provider especÃfico: gitea, github ou both
|
|
53
|
+
projectPath: zod_1.z.string().describe('Local project path for git operations'),
|
|
54
|
+
// Para create
|
|
55
|
+
title: zod_1.z.string().optional(),
|
|
56
|
+
body: zod_1.z.string().optional(),
|
|
57
|
+
labels: zod_1.z.array(zod_1.z.string()).optional(),
|
|
58
|
+
assignees: zod_1.z.array(zod_1.z.string()).optional(),
|
|
59
|
+
milestone: zod_1.z.number().optional(),
|
|
60
|
+
// Para get/update/close/comment
|
|
61
|
+
issue_number: zod_1.z.number().optional(),
|
|
62
|
+
// Para list
|
|
63
|
+
state: zod_1.z.enum(['open', 'closed', 'all']).optional(),
|
|
64
|
+
page: zod_1.z.number().min(1).optional(),
|
|
65
|
+
limit: zod_1.z.number().min(1).max(100).optional(),
|
|
66
|
+
// Para update
|
|
67
|
+
new_title: zod_1.z.string().optional(),
|
|
68
|
+
new_body: zod_1.z.string().optional(),
|
|
69
|
+
new_state: zod_1.z.enum(['open', 'closed']).optional(),
|
|
70
|
+
new_labels: zod_1.z.array(zod_1.z.string()).optional(),
|
|
71
|
+
new_assignees: zod_1.z.array(zod_1.z.string()).optional(),
|
|
72
|
+
new_milestone: zod_1.z.number().optional(),
|
|
73
|
+
// Para comment
|
|
74
|
+
comment_body: zod_1.z.string().optional(),
|
|
75
|
+
// Para search
|
|
76
|
+
query: zod_1.z.string().optional(),
|
|
77
|
+
author: zod_1.z.string().optional(),
|
|
78
|
+
assignee: zod_1.z.string().optional(),
|
|
79
|
+
label: zod_1.z.string().optional(),
|
|
80
|
+
});
|
|
81
|
+
/**
|
|
82
|
+
* Schema de saÃda padronizado
|
|
83
|
+
*
|
|
84
|
+
* ESTRUTURA:
|
|
85
|
+
* - success: Status da operação
|
|
86
|
+
* - action: Ação executada
|
|
87
|
+
* - message: Mensagem descritiva
|
|
88
|
+
* - data: Dados retornados (opcional)
|
|
89
|
+
* - error: Detalhes do erro (opcional)
|
|
90
|
+
*/
|
|
91
|
+
const IssuesResultSchema = zod_1.z.object({
|
|
92
|
+
success: zod_1.z.boolean(),
|
|
93
|
+
action: zod_1.z.string(),
|
|
94
|
+
message: zod_1.z.string(),
|
|
95
|
+
data: zod_1.z.any().optional(),
|
|
96
|
+
error: zod_1.z.string().optional()
|
|
97
|
+
});
|
|
98
|
+
/**
|
|
99
|
+
* Tool: issues
|
|
100
|
+
*
|
|
101
|
+
* DESCRIÇÃO:
|
|
102
|
+
* Gerenciamento completo de issues Gitea com múltiplas ações
|
|
103
|
+
*
|
|
104
|
+
* ACTIONS DISPONÃVEIS:
|
|
105
|
+
*
|
|
106
|
+
* 1. create - Criar nova issue
|
|
107
|
+
* Parâmetros:
|
|
108
|
+
* - owner (obrigatório): Proprietário do repositório
|
|
109
|
+
* - repo (obrigatório): Nome do repositório
|
|
110
|
+
* - title (obrigatório): TÃtulo da issue
|
|
111
|
+
* - body (opcional): Descrição detalhada
|
|
112
|
+
* - labels (opcional): Array de labels
|
|
113
|
+
* - assignees (opcional): Array de usuários responsáveis
|
|
114
|
+
* - milestone (opcional): ID do milestone
|
|
115
|
+
*
|
|
116
|
+
* 2. list - Listar issues
|
|
117
|
+
* Parâmetros:
|
|
118
|
+
* - owner (obrigatório): Proprietário do repositório
|
|
119
|
+
* - repo (obrigatório): Nome do repositório
|
|
120
|
+
* - state (opcional): Estado das issues (open, closed, all) - padrão: open
|
|
121
|
+
* - page (opcional): Página da listagem (padrão: 1)
|
|
122
|
+
* - limit (opcional): Itens por página (padrão: 30, máximo: 100)
|
|
123
|
+
*
|
|
124
|
+
* 3. get - Obter detalhes da issue
|
|
125
|
+
* Parâmetros:
|
|
126
|
+
* - owner (obrigatório): Proprietário do repositório
|
|
127
|
+
* - repo (obrigatório): Nome do repositório
|
|
128
|
+
* - issue_number (obrigatório): Número da issue
|
|
129
|
+
*
|
|
130
|
+
* 4. update - Atualizar issue existente
|
|
131
|
+
* Parâmetros:
|
|
132
|
+
* - owner (obrigatório): Proprietário do repositório
|
|
133
|
+
* - repo (obrigatório): Nome do repositório
|
|
134
|
+
* - issue_number (obrigatório): Número da issue
|
|
135
|
+
* - new_title (opcional): Novo tÃtulo
|
|
136
|
+
* - new_body (opcional): Nova descrição
|
|
137
|
+
* - new_state (opcional): Novo estado
|
|
138
|
+
* - new_labels (opcional): Novos labels
|
|
139
|
+
* - new_assignees (opcional): Novos responsáveis
|
|
140
|
+
* - new_milestone (opcional): Novo milestone
|
|
141
|
+
*
|
|
142
|
+
* 5. close - Fechar issue
|
|
143
|
+
* Parâmetros:
|
|
144
|
+
* - owner (obrigatório): Proprietário do repositório
|
|
145
|
+
* - repo (obrigatório): Nome do repositório
|
|
146
|
+
* - issue_number (obrigatório): Número da issue
|
|
147
|
+
*
|
|
148
|
+
* 6. comment - Adicionar comentário
|
|
149
|
+
* Parâmetros:
|
|
150
|
+
* - owner (obrigatório): Proprietário do repositório
|
|
151
|
+
* - repo (obrigatório): Nome do repositório
|
|
152
|
+
* - issue_number (obrigatório): Número da issue
|
|
153
|
+
* - comment_body (obrigatório): Conteúdo do comentário
|
|
154
|
+
*
|
|
155
|
+
* 7. search - Buscar issues
|
|
156
|
+
* Parâmetros:
|
|
157
|
+
* - owner (obrigatório): Proprietário do repositório
|
|
158
|
+
* - repo (obrigatório): Nome do repositório
|
|
159
|
+
* - query (obrigatório): Termo de busca
|
|
160
|
+
* - author (opcional): Autor das issues
|
|
161
|
+
* - assignee (opcional): Responsável pelas issues
|
|
162
|
+
* - label (opcional): Label especÃfico
|
|
163
|
+
*
|
|
164
|
+
* RECOMENDAÇÕES DE USO:
|
|
165
|
+
* - Use tÃtulos descritivos e claros
|
|
166
|
+
* - Documente detalhes completos na descrição
|
|
167
|
+
* - Atualize status regularmente
|
|
168
|
+
* - Use labels para categorização
|
|
169
|
+
* - Atribua responsáveis adequadamente
|
|
170
|
+
* - Mantenha issues organizadas
|
|
171
|
+
*/
|
|
172
|
+
exports.issuesTool = {
|
|
173
|
+
name: 'git-issues',
|
|
174
|
+
description: 'tool: Gerencia issues Git, bugs, features e tarefas\n──────────────\naction create: cria nova issue\naction create requires: repo, title, body, labels, assignees, milestone, provider\n───────────────\naction list: lista issues do repositório\naction list requires: repo, state, page, limit, provider\n───────────────\naction get: obtém detalhes de issue\naction get requires: repo, issue_number, provider\n───────────────\naction update: atualiza issue existente\naction update requires: repo, issue_number, new_title, new_body, new_state, new_labels, new_assignees, new_milestone, provider\n───────────────\naction close: fecha issue\naction close requires: repo, issue_number, provider\n───────────────\naction comment: adiciona comentário\naction comment requires: repo, issue_number, comment_body, provider\n───────────────\naction search: busca issues por critérios\naction search requires: repo, query, author, assignee, label, provider',
|
|
175
|
+
inputSchema: {
|
|
176
|
+
type: 'object',
|
|
177
|
+
properties: {
|
|
178
|
+
action: {
|
|
179
|
+
type: 'string',
|
|
180
|
+
enum: ['create', 'list', 'get', 'update', 'close', 'comment', 'search'],
|
|
181
|
+
description: 'Action to perform on issues'
|
|
182
|
+
},
|
|
183
|
+
repo: { type: 'string', description: 'Repository name' },
|
|
184
|
+
provider: { type: 'string', description: 'Provider to use (github, gitea, or omit for default)' },
|
|
185
|
+
title: { type: 'string', description: 'Issue title' },
|
|
186
|
+
body: { type: 'string', description: 'Issue body/description' },
|
|
187
|
+
labels: { type: 'array', items: { type: 'string' }, description: 'Issue labels' },
|
|
188
|
+
assignees: { type: 'array', items: { type: 'string' }, description: 'Issue assignees' },
|
|
189
|
+
milestone: { type: 'number', description: 'Milestone ID' },
|
|
190
|
+
issue_number: { type: 'number', description: 'Issue number' },
|
|
191
|
+
state: { type: 'string', enum: ['open', 'closed', 'all'], description: 'Issue state' },
|
|
192
|
+
page: { type: 'number', description: 'Page number', minimum: 1 },
|
|
193
|
+
limit: { type: 'number', description: 'Items per page', minimum: 1, maximum: 100 },
|
|
194
|
+
new_title: { type: 'string', description: 'New issue title' },
|
|
195
|
+
new_body: { type: 'string', description: 'New issue body' },
|
|
196
|
+
new_state: { type: 'string', enum: ['open', 'closed'], description: 'New issue state' },
|
|
197
|
+
new_labels: { type: 'array', items: { type: 'string' }, description: 'New issue labels' },
|
|
198
|
+
new_assignees: { type: 'array', items: { type: 'string' }, description: 'New issue assignees' },
|
|
199
|
+
new_milestone: { type: 'number', description: 'New milestone ID' },
|
|
200
|
+
comment_body: { type: 'string', description: 'Comment content' },
|
|
201
|
+
query: { type: 'string', description: 'Search query' },
|
|
202
|
+
author: { type: 'string', description: 'Issue author filter' },
|
|
203
|
+
assignee: { type: 'string', description: 'Issue assignee filter' },
|
|
204
|
+
label: { type: 'string', description: 'Issue label filter' }
|
|
205
|
+
},
|
|
206
|
+
required: ['action', 'repo', 'provider', 'projectPath']
|
|
207
|
+
},
|
|
208
|
+
/**
|
|
209
|
+
* Handler principal da tool issues
|
|
210
|
+
*
|
|
211
|
+
* FUNCIONALIDADE:
|
|
212
|
+
* - Valida entrada usando Zod schema
|
|
213
|
+
* - Roteia para método especÃfico baseado na ação
|
|
214
|
+
* - Trata erros de forma uniforme
|
|
215
|
+
* - Retorna resultado padronizado
|
|
216
|
+
*
|
|
217
|
+
* FLUXO:
|
|
218
|
+
* 1. Validação de entrada
|
|
219
|
+
* 2. Seleção do provider
|
|
220
|
+
* 3. Roteamento por ação
|
|
221
|
+
* 4. Execução do método especÃfico
|
|
222
|
+
* 5. Tratamento de erros
|
|
223
|
+
* 6. Retorno de resultado
|
|
224
|
+
*
|
|
225
|
+
* TRATAMENTO DE ERROS:
|
|
226
|
+
* - Validação: erro de schema
|
|
227
|
+
* - Execução: erro da operação
|
|
228
|
+
* - Roteamento: ação não suportada
|
|
229
|
+
*
|
|
230
|
+
* RECOMENDAÇÕES:
|
|
231
|
+
* - Sempre valide entrada antes de processar
|
|
232
|
+
* - Trate erros especÃficos adequadamente
|
|
233
|
+
* - Log detalhes de erro para debug
|
|
234
|
+
* - Retorne mensagens de erro úteis
|
|
235
|
+
*/
|
|
236
|
+
async handler(input) {
|
|
237
|
+
try {
|
|
238
|
+
const validatedInput = IssuesInputSchema.parse(input);
|
|
239
|
+
// Aplicar auto-detecção de usuário/owner
|
|
240
|
+
const processedInput = await (0, user_detection_js_1.applyAutoUserDetection)(validatedInput, validatedInput.provider);
|
|
241
|
+
// Obter o provider correto
|
|
242
|
+
let provider;
|
|
243
|
+
try {
|
|
244
|
+
if (processedInput.provider) {
|
|
245
|
+
const requestedProvider = index_js_1.globalProviderFactory.getProvider(processedInput.provider);
|
|
246
|
+
if (!requestedProvider) {
|
|
247
|
+
console.warn(`[ISSUES] Provider '${processedInput.provider}' não encontrado, usando padrão`);
|
|
248
|
+
provider = index_js_1.globalProviderFactory.getDefaultProvider();
|
|
249
|
+
}
|
|
250
|
+
else {
|
|
251
|
+
provider = requestedProvider;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
else {
|
|
255
|
+
provider = index_js_1.globalProviderFactory.getDefaultProvider();
|
|
256
|
+
}
|
|
257
|
+
if (!provider) {
|
|
258
|
+
throw new Error('Nenhum provider disponÃvel');
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
catch (providerError) {
|
|
262
|
+
console.error('[ISSUES] Erro ao obter provider:', providerError);
|
|
263
|
+
throw new Error(`Erro de configuração do provider: ${providerError instanceof Error ? providerError.message : 'Provider não disponÃvel'}`);
|
|
264
|
+
}
|
|
265
|
+
// Obter o owner do provider
|
|
266
|
+
const owner = (await provider.getCurrentUser()).login;
|
|
267
|
+
switch (processedInput.action) {
|
|
268
|
+
case 'create':
|
|
269
|
+
return await this.createIssue(processedInput, provider, owner);
|
|
270
|
+
case 'list':
|
|
271
|
+
return await this.listIssues(processedInput, provider, owner);
|
|
272
|
+
case 'get':
|
|
273
|
+
return await this.getIssue(processedInput, provider, owner);
|
|
274
|
+
case 'update':
|
|
275
|
+
return await this.updateIssue(processedInput, provider, owner);
|
|
276
|
+
case 'close':
|
|
277
|
+
return await this.closeIssue(processedInput, provider, owner);
|
|
278
|
+
case 'comment':
|
|
279
|
+
return await this.addComment(processedInput, provider, owner);
|
|
280
|
+
case 'search':
|
|
281
|
+
return await this.searchIssues(processedInput, provider, owner);
|
|
282
|
+
default:
|
|
283
|
+
throw new Error(`Ação não suportada: ${processedInput.action}`);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
catch (error) {
|
|
287
|
+
return {
|
|
288
|
+
success: false,
|
|
289
|
+
action: input.action,
|
|
290
|
+
message: 'Erro na operação de issues',
|
|
291
|
+
error: error instanceof Error ? error.message : String(error)
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
/**
|
|
296
|
+
* Cria uma nova issue no repositório
|
|
297
|
+
*
|
|
298
|
+
* FUNCIONALIDADE:
|
|
299
|
+
* - Cria issue com tÃtulo e descrição
|
|
300
|
+
* - Suporta labels, assignees e milestone
|
|
301
|
+
* - Retorna detalhes da issue criada
|
|
302
|
+
*
|
|
303
|
+
* PARÂMETROS OBRIGATÓRIOS:
|
|
304
|
+
* - owner: Proprietário do repositório
|
|
305
|
+
* - repo: Nome do repositório
|
|
306
|
+
* - title: TÃtulo da issue
|
|
307
|
+
*
|
|
308
|
+
* PARÂMETROS OPCIONAIS:
|
|
309
|
+
* - body: Descrição detalhada
|
|
310
|
+
* - labels: Array de labels para categorização
|
|
311
|
+
* - assignees: Array de usuários responsáveis
|
|
312
|
+
* - milestone: ID do milestone associado
|
|
313
|
+
*
|
|
314
|
+
* VALIDAÇÕES:
|
|
315
|
+
* - Todos os parâmetros obrigatórios
|
|
316
|
+
* - TÃtulo deve ser único no repositório
|
|
317
|
+
* - Labels devem existir no repositório
|
|
318
|
+
* - Assignees devem ser usuários válidos
|
|
319
|
+
*
|
|
320
|
+
* RECOMENDAÇÕES:
|
|
321
|
+
* - Use tÃtulos descritivos e claros
|
|
322
|
+
* - Documente detalhes completos
|
|
323
|
+
* - Use labels para categorização
|
|
324
|
+
* - Atribua responsáveis adequadamente
|
|
325
|
+
*/
|
|
326
|
+
async createIssue(params, provider, owner) {
|
|
327
|
+
try {
|
|
328
|
+
if (!owner) {
|
|
329
|
+
throw new Error('é obrigatório');
|
|
330
|
+
}
|
|
331
|
+
if (!params.repo) {
|
|
332
|
+
throw new Error('Repo é obrigatório');
|
|
333
|
+
}
|
|
334
|
+
if (!params.title) {
|
|
335
|
+
throw new Error('Title é obrigatório');
|
|
336
|
+
}
|
|
337
|
+
const issue = await provider.createIssue(owner, params.repo, params.title, params.body, params.assignees, params.labels);
|
|
338
|
+
return {
|
|
339
|
+
success: true,
|
|
340
|
+
action: 'create',
|
|
341
|
+
message: `Issue '${params.title}' criada com sucesso`,
|
|
342
|
+
data: issue
|
|
343
|
+
};
|
|
344
|
+
}
|
|
345
|
+
catch (error) {
|
|
346
|
+
throw new Error(`Falha ao criar issue: ${error instanceof Error ? error.message : String(error)}`);
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
/**
|
|
350
|
+
* Lista issues do repositório
|
|
351
|
+
*
|
|
352
|
+
* FUNCIONALIDADE:
|
|
353
|
+
* - Lista issues com filtros de estado
|
|
354
|
+
* - Suporta paginação
|
|
355
|
+
* - Retorna informações básicas de cada issue
|
|
356
|
+
*
|
|
357
|
+
* PARÂMETROS OBRIGATÓRIOS:
|
|
358
|
+
* - owner: Proprietário do repositório
|
|
359
|
+
* - repo: Nome do repositório
|
|
360
|
+
*
|
|
361
|
+
* PARÂMETROS OPCIONAIS:
|
|
362
|
+
* - state: Estado das issues (open, closed, all) - padrão: open
|
|
363
|
+
* - page: Página da listagem (padrão: 1)
|
|
364
|
+
* - limit: Itens por página (padrão: 30, máximo: 100)
|
|
365
|
+
*
|
|
366
|
+
* VALIDAÇÕES:
|
|
367
|
+
* - e repo obrigatórios
|
|
368
|
+
* - State deve ser um dos valores válidos
|
|
369
|
+
* - Page deve ser >= 1
|
|
370
|
+
* - Limit deve ser entre 1 e 100
|
|
371
|
+
*
|
|
372
|
+
* RECOMENDAÇÕES:
|
|
373
|
+
* - Use paginação para repositórios com muitas issues
|
|
374
|
+
* - Monitore número total de issues
|
|
375
|
+
* - Filtre por estado para organização
|
|
376
|
+
* - Mantenha issues organizadas
|
|
377
|
+
*/
|
|
378
|
+
async listIssues(params, provider, owner) {
|
|
379
|
+
try {
|
|
380
|
+
if (!owner) {
|
|
381
|
+
throw new Error('é obrigatório');
|
|
382
|
+
}
|
|
383
|
+
if (!params.repo) {
|
|
384
|
+
throw new Error('Repo é obrigatório');
|
|
385
|
+
}
|
|
386
|
+
const state = params.state || 'open';
|
|
387
|
+
const page = params.page || 1;
|
|
388
|
+
const limit = params.limit || 30;
|
|
389
|
+
const issues = await provider.listIssues((await provider.getCurrentUser()).login, params.repo, state, page, limit);
|
|
390
|
+
return {
|
|
391
|
+
success: true,
|
|
392
|
+
action: 'list',
|
|
393
|
+
message: `${issues.length} issues ${state} encontradas`,
|
|
394
|
+
data: {
|
|
395
|
+
issues,
|
|
396
|
+
state,
|
|
397
|
+
page,
|
|
398
|
+
limit,
|
|
399
|
+
total: issues.length
|
|
400
|
+
}
|
|
401
|
+
};
|
|
402
|
+
}
|
|
403
|
+
catch (error) {
|
|
404
|
+
throw new Error(`Falha ao listar issues: ${error instanceof Error ? error.message : String(error)}`);
|
|
405
|
+
}
|
|
406
|
+
},
|
|
407
|
+
/**
|
|
408
|
+
* Obtém detalhes de uma issue especÃfica
|
|
409
|
+
*
|
|
410
|
+
* FUNCIONALIDADE:
|
|
411
|
+
* - Retorna informações completas da issue
|
|
412
|
+
* - Inclui tÃtulo, descrição, labels, assignees
|
|
413
|
+
* - Mostra histórico de comentários
|
|
414
|
+
*
|
|
415
|
+
* PARÂMETROS OBRIGATÓRIOS:
|
|
416
|
+
* - owner: Proprietário do repositório
|
|
417
|
+
* - repo: Nome do repositório
|
|
418
|
+
* - issue_number: Número da issue
|
|
419
|
+
*
|
|
420
|
+
* VALIDAÇÕES:
|
|
421
|
+
* - Todos os parâmetros obrigatórios
|
|
422
|
+
* - Issue deve existir no repositório
|
|
423
|
+
* - Número deve ser válido
|
|
424
|
+
*
|
|
425
|
+
* RECOMENDAÇÕES:
|
|
426
|
+
* - Use para obter detalhes completos
|
|
427
|
+
* - Verifique status e labels
|
|
428
|
+
* - Analise comentários e histórico
|
|
429
|
+
* - Monitore mudanças importantes
|
|
430
|
+
*/
|
|
431
|
+
async getIssue(params, provider, owner) {
|
|
432
|
+
try {
|
|
433
|
+
// Aplicar auto-detecção se necessário
|
|
434
|
+
if (!owner) {
|
|
435
|
+
throw new Error('é obrigatório');
|
|
436
|
+
}
|
|
437
|
+
if (!params.repo) {
|
|
438
|
+
throw new Error('Repo é obrigatório');
|
|
439
|
+
}
|
|
440
|
+
if (!params.issue_number) {
|
|
441
|
+
throw new Error('Issue_number é obrigatório');
|
|
442
|
+
}
|
|
443
|
+
const issue = await provider.getIssue((await provider.getCurrentUser()).login, params.repo, params.issue_number);
|
|
444
|
+
return {
|
|
445
|
+
success: true,
|
|
446
|
+
action: 'get',
|
|
447
|
+
message: `Issue #${params.issue_number} obtida com sucesso`,
|
|
448
|
+
data: issue
|
|
449
|
+
};
|
|
450
|
+
}
|
|
451
|
+
catch (error) {
|
|
452
|
+
throw new Error(`Falha ao obter issue: ${error instanceof Error ? error.message : String(error)}`);
|
|
453
|
+
}
|
|
454
|
+
},
|
|
455
|
+
/**
|
|
456
|
+
* Atualiza uma issue existente
|
|
457
|
+
*
|
|
458
|
+
* FUNCIONALIDADE:
|
|
459
|
+
* - Atualiza campos da issue
|
|
460
|
+
* - Suporta mudança de estado
|
|
461
|
+
* - Permite alteração de labels e assignees
|
|
462
|
+
*
|
|
463
|
+
* PARÂMETROS OBRIGATÓRIOS:
|
|
464
|
+
* - owner: Proprietário do repositório
|
|
465
|
+
* - repo: Nome do repositório
|
|
466
|
+
* - issue_number: Número da issue
|
|
467
|
+
*
|
|
468
|
+
* PARÂMETROS OPCIONAIS:
|
|
469
|
+
* - new_title: Novo tÃtulo
|
|
470
|
+
* - new_body: Nova descrição
|
|
471
|
+
* - new_state: Novo estado
|
|
472
|
+
* - new_labels: Novos labels
|
|
473
|
+
* - new_assignees: Novos responsáveis
|
|
474
|
+
* - new_milestone: Novo milestone
|
|
475
|
+
*
|
|
476
|
+
* VALIDAÇÕES:
|
|
477
|
+
* - Todos os parâmetros obrigatórios
|
|
478
|
+
* - Issue deve existir
|
|
479
|
+
* - Pelo menos um campo deve ser atualizado
|
|
480
|
+
*
|
|
481
|
+
* RECOMENDAÇÕES:
|
|
482
|
+
* - Atualize apenas campos necessários
|
|
483
|
+
* - Use mensagens de commit descritivas
|
|
484
|
+
* - Documente mudanças importantes
|
|
485
|
+
* - Notifique responsáveis sobre mudanças
|
|
486
|
+
*/
|
|
487
|
+
async updateIssue(params, provider, owner) {
|
|
488
|
+
try {
|
|
489
|
+
if (!owner) {
|
|
490
|
+
throw new Error('é obrigatório');
|
|
491
|
+
}
|
|
492
|
+
if (!params.repo) {
|
|
493
|
+
throw new Error('Repo é obrigatório');
|
|
494
|
+
}
|
|
495
|
+
if (!params.issue_number) {
|
|
496
|
+
throw new Error('Issue_number é obrigatório');
|
|
497
|
+
}
|
|
498
|
+
const updateData = {};
|
|
499
|
+
if (params.new_title)
|
|
500
|
+
updateData.title = params.new_title;
|
|
501
|
+
if (params.new_body !== undefined)
|
|
502
|
+
updateData.body = params.new_body;
|
|
503
|
+
if (params.new_state)
|
|
504
|
+
updateData.state = params.new_state;
|
|
505
|
+
if (params.new_labels)
|
|
506
|
+
updateData.labels = params.new_labels;
|
|
507
|
+
if (params.new_assignees)
|
|
508
|
+
updateData.assignees = params.new_assignees;
|
|
509
|
+
if (params.new_milestone !== undefined)
|
|
510
|
+
updateData.milestone = params.new_milestone;
|
|
511
|
+
if (Object.keys(updateData).length === 0) {
|
|
512
|
+
throw new Error('Nenhum campo para atualizar foi fornecido');
|
|
513
|
+
}
|
|
514
|
+
const issue = await provider.updateIssue((await provider.getCurrentUser()).login, params.repo, params.issue_number, updateData);
|
|
515
|
+
return {
|
|
516
|
+
success: true,
|
|
517
|
+
action: 'update',
|
|
518
|
+
message: `Issue #${params.issue_number} atualizada com sucesso`,
|
|
519
|
+
data: issue
|
|
520
|
+
};
|
|
521
|
+
}
|
|
522
|
+
catch (error) {
|
|
523
|
+
throw new Error(`Falha ao atualizar issue: ${error instanceof Error ? error.message : String(error)}`);
|
|
524
|
+
}
|
|
525
|
+
},
|
|
526
|
+
/**
|
|
527
|
+
* Fecha uma issue
|
|
528
|
+
*
|
|
529
|
+
* FUNCIONALIDADE:
|
|
530
|
+
* - Altera estado da issue para closed
|
|
531
|
+
* - Mantém histórico e comentários
|
|
532
|
+
* - Permite reabertura posterior
|
|
533
|
+
*
|
|
534
|
+
* PARÂMETROS OBRIGATÓRIOS:
|
|
535
|
+
* - owner: Proprietário do repositório
|
|
536
|
+
* - repo: Nome do repositório
|
|
537
|
+
* - issue_number: Número da issue
|
|
538
|
+
*
|
|
539
|
+
* VALIDAÇÕES:
|
|
540
|
+
* - Todos os parâmetros obrigatórios
|
|
541
|
+
* - Issue deve existir
|
|
542
|
+
* - Issue deve estar aberta
|
|
543
|
+
*
|
|
544
|
+
* RECOMENDAÇÕES:
|
|
545
|
+
* - Confirme que issue foi resolvida
|
|
546
|
+
* - Documente solução aplicada
|
|
547
|
+
* - Use comentário explicativo
|
|
548
|
+
* - Verifique se não há dependências
|
|
549
|
+
*/
|
|
550
|
+
async closeIssue(params, provider, owner) {
|
|
551
|
+
try {
|
|
552
|
+
if (!owner) {
|
|
553
|
+
throw new Error('é obrigatório');
|
|
554
|
+
}
|
|
555
|
+
if (!params.repo) {
|
|
556
|
+
throw new Error('Repo é obrigatório');
|
|
557
|
+
}
|
|
558
|
+
if (!params.issue_number) {
|
|
559
|
+
throw new Error('Issue_number é obrigatório');
|
|
560
|
+
}
|
|
561
|
+
const issue = await provider.updateIssue((await provider.getCurrentUser()).login, params.repo, params.issue_number, { state: 'closed' });
|
|
562
|
+
return {
|
|
563
|
+
success: true,
|
|
564
|
+
action: 'close',
|
|
565
|
+
message: `Issue #${params.issue_number} fechada com sucesso`,
|
|
566
|
+
data: issue
|
|
567
|
+
};
|
|
568
|
+
}
|
|
569
|
+
catch (error) {
|
|
570
|
+
throw new Error(`Falha ao fechar issue: ${error instanceof Error ? error.message : String(error)}`);
|
|
571
|
+
}
|
|
572
|
+
},
|
|
573
|
+
/**
|
|
574
|
+
* Adiciona comentário a uma issue
|
|
575
|
+
*
|
|
576
|
+
* FUNCIONALIDADE:
|
|
577
|
+
* - Cria novo comentário na issue
|
|
578
|
+
* - Mantém histórico de discussão
|
|
579
|
+
* - Suporta formatação Markdown
|
|
580
|
+
*
|
|
581
|
+
* PARÂMETROS OBRIGATÓRIOS:
|
|
582
|
+
* - owner: Proprietário do repositório
|
|
583
|
+
* - repo: Nome do repositório
|
|
584
|
+
* - issue_number: Número da issue
|
|
585
|
+
* - comment_body: Conteúdo do comentário
|
|
586
|
+
*
|
|
587
|
+
* VALIDAÇÕES:
|
|
588
|
+
* - Todos os parâmetros obrigatórios
|
|
589
|
+
* - Issue deve existir
|
|
590
|
+
* - Comentário não pode estar vazio
|
|
591
|
+
*
|
|
592
|
+
* RECOMENDAÇÕES:
|
|
593
|
+
* - Use comentários para atualizações
|
|
594
|
+
* - Documente progresso e decisões
|
|
595
|
+
* - Use formatação Markdown adequadamente
|
|
596
|
+
* - Mantenha comentários relevantes
|
|
597
|
+
*/
|
|
598
|
+
async addComment(params, provider, owner) {
|
|
599
|
+
try {
|
|
600
|
+
if (!owner) {
|
|
601
|
+
throw new Error('é obrigatório');
|
|
602
|
+
}
|
|
603
|
+
if (!params.repo) {
|
|
604
|
+
throw new Error('Repo é obrigatório');
|
|
605
|
+
}
|
|
606
|
+
if (!params.issue_number) {
|
|
607
|
+
throw new Error('Issue_number é obrigatório');
|
|
608
|
+
}
|
|
609
|
+
if (!params.comment_body) {
|
|
610
|
+
throw new Error('Comment_body é obrigatório');
|
|
611
|
+
}
|
|
612
|
+
// Verificar se a issue existe
|
|
613
|
+
try {
|
|
614
|
+
await provider.getIssue(owner, params.repo, params.issue_number);
|
|
615
|
+
}
|
|
616
|
+
catch (error) {
|
|
617
|
+
throw new Error(`Issue #${params.issue_number} não encontrada no repositório`);
|
|
618
|
+
}
|
|
619
|
+
// Adicionar comentário usando o provider
|
|
620
|
+
const comment = await provider.addComment(owner, params.repo, params.issue_number, params.comment_body);
|
|
621
|
+
return {
|
|
622
|
+
success: true,
|
|
623
|
+
action: 'comment',
|
|
624
|
+
message: `Comentário adicionado à issue #${params.issue_number} com sucesso`,
|
|
625
|
+
data: {
|
|
626
|
+
issue_number: params.issue_number,
|
|
627
|
+
comment: comment,
|
|
628
|
+
body: params.comment_body,
|
|
629
|
+
created_at: comment.created_at,
|
|
630
|
+
updated_at: comment.updated_at,
|
|
631
|
+
user: comment.user,
|
|
632
|
+
html_url: comment.html_url
|
|
633
|
+
}
|
|
634
|
+
};
|
|
635
|
+
}
|
|
636
|
+
catch (error) {
|
|
637
|
+
throw new Error(`Falha ao adicionar comentário: ${error instanceof Error ? error.message : String(error)}`);
|
|
638
|
+
}
|
|
639
|
+
},
|
|
640
|
+
/**
|
|
641
|
+
* Busca issues por critérios especÃficos
|
|
642
|
+
*
|
|
643
|
+
* FUNCIONALIDADE:
|
|
644
|
+
* - Busca issues por conteúdo
|
|
645
|
+
* - Filtra por autor, assignee e label
|
|
646
|
+
* - Retorna resultados relevantes
|
|
647
|
+
*
|
|
648
|
+
* PARÂMETROS OBRIGATÓRIOS:
|
|
649
|
+
* - owner: Proprietário do repositório
|
|
650
|
+
* - repo: Nome do repositório
|
|
651
|
+
* - query: Termo de busca
|
|
652
|
+
*
|
|
653
|
+
* PARÂMETROS OPCIONAIS:
|
|
654
|
+
* - author: Autor das issues
|
|
655
|
+
* - assignee: Responsável pelas issues
|
|
656
|
+
* - label: Label especÃfico
|
|
657
|
+
*
|
|
658
|
+
* VALIDAÇÕES:
|
|
659
|
+
* - Todos os parâmetros obrigatórios
|
|
660
|
+
* - Query deve ter pelo menos 3 caracteres
|
|
661
|
+
* - Repositório deve existir
|
|
662
|
+
*
|
|
663
|
+
* RECOMENDAÇÕES:
|
|
664
|
+
* - Use termos de busca especÃficos
|
|
665
|
+
* - Combine filtros para resultados precisos
|
|
666
|
+
* - Analise relevância dos resultados
|
|
667
|
+
* - Use para encontrar issues relacionadas
|
|
668
|
+
*/
|
|
669
|
+
async searchIssues(params, provider, owner) {
|
|
670
|
+
try {
|
|
671
|
+
if (!owner) {
|
|
672
|
+
throw new Error('é obrigatório');
|
|
673
|
+
}
|
|
674
|
+
if (!params.repo) {
|
|
675
|
+
throw new Error('Repo é obrigatório');
|
|
676
|
+
}
|
|
677
|
+
if (!params.query) {
|
|
678
|
+
throw new Error('Query é obrigatório');
|
|
679
|
+
}
|
|
680
|
+
if (params.query.length < 3) {
|
|
681
|
+
throw new Error('Query deve ter pelo menos 3 caracteres');
|
|
682
|
+
}
|
|
683
|
+
const page = params.page || 1;
|
|
684
|
+
const limit = Math.min(params.limit || 30, 100);
|
|
685
|
+
// Buscar issues usando o provider
|
|
686
|
+
let searchResults = [];
|
|
687
|
+
if (provider.searchIssues) {
|
|
688
|
+
searchResults = await provider.searchIssues(owner, params.repo, params.query, params.author || undefined, params.assignee || undefined, params.label || undefined);
|
|
689
|
+
}
|
|
690
|
+
else {
|
|
691
|
+
// Fallback: buscar todas as issues e filtrar localmente
|
|
692
|
+
const allIssues = await provider.listIssues(owner, params.repo, 'all', 1, 100);
|
|
693
|
+
searchResults = allIssues.filter((issue) => issue.title?.toLowerCase().includes(params.query?.toLowerCase() || '') ||
|
|
694
|
+
issue.body?.toLowerCase().includes(params.query?.toLowerCase() || ''));
|
|
695
|
+
}
|
|
696
|
+
// Filtrar resultados por página e limite
|
|
697
|
+
const startIndex = (page - 1) * limit;
|
|
698
|
+
const endIndex = startIndex + limit;
|
|
699
|
+
const paginatedResults = searchResults.slice(startIndex, endIndex);
|
|
700
|
+
// Aplicar filtros adicionais se especificados
|
|
701
|
+
let filteredResults = paginatedResults;
|
|
702
|
+
if (params.author) {
|
|
703
|
+
filteredResults = filteredResults.filter((issue) => issue.user?.login?.toLowerCase().includes(params.author.toLowerCase()));
|
|
704
|
+
}
|
|
705
|
+
if (params.assignee) {
|
|
706
|
+
filteredResults = filteredResults.filter((issue) => issue.assignees?.some((assignee) => assignee.login?.toLowerCase().includes(params.assignee.toLowerCase())));
|
|
707
|
+
}
|
|
708
|
+
if (params.label) {
|
|
709
|
+
filteredResults = filteredResults.filter((issue) => issue.labels?.some((label) => label.name?.toLowerCase().includes(params.label.toLowerCase())));
|
|
710
|
+
}
|
|
711
|
+
return {
|
|
712
|
+
success: true,
|
|
713
|
+
action: 'search',
|
|
714
|
+
message: `${filteredResults.length} issues encontradas para '${params.query}'`,
|
|
715
|
+
data: {
|
|
716
|
+
query: params.query,
|
|
717
|
+
author: params.author || 'todos',
|
|
718
|
+
assignee: params.assignee || 'todos',
|
|
719
|
+
label: params.label || 'todos',
|
|
720
|
+
page,
|
|
721
|
+
limit,
|
|
722
|
+
total_found: searchResults.length,
|
|
723
|
+
results: filteredResults,
|
|
724
|
+
summary: {
|
|
725
|
+
total_issues: searchResults.length,
|
|
726
|
+
filtered_issues: filteredResults.length,
|
|
727
|
+
states: {
|
|
728
|
+
open: filteredResults.filter((i) => i.state === 'open').length,
|
|
729
|
+
closed: filteredResults.filter((i) => i.state === 'closed').length
|
|
730
|
+
},
|
|
731
|
+
labels: [...new Set(filteredResults.flatMap((i) => i.labels?.map((l) => l.name) || []).filter(Boolean))],
|
|
732
|
+
assignees: [...new Set(filteredResults.flatMap((i) => i.assignees?.map((a) => a.login) || []).filter(Boolean))]
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
};
|
|
736
|
+
}
|
|
737
|
+
catch (error) {
|
|
738
|
+
throw new Error(`Falha ao buscar issues: ${error instanceof Error ? error.message : String(error)}`);
|
|
739
|
+
}
|
|
740
|
+
},
|
|
741
|
+
/**
|
|
742
|
+
* Verifica se erro é relacionado a Git
|
|
743
|
+
*/
|
|
744
|
+
isGitRelatedError(errorMessage) {
|
|
745
|
+
const gitKeywords = [
|
|
746
|
+
'git', 'commit', 'push', 'pull', 'merge', 'conflict', 'branch',
|
|
747
|
+
'remote', 'repository', 'authentication', 'permission', 'unauthorized',
|
|
748
|
+
'divergent', 'non-fast-forward', 'fetch first', 'working tree',
|
|
749
|
+
'uncommitted', 'stash', 'rebase', 'reset', 'checkout'
|
|
750
|
+
];
|
|
751
|
+
const errorLower = errorMessage.toLowerCase();
|
|
752
|
+
return gitKeywords.some(keyword => errorLower.includes(keyword));
|
|
753
|
+
}
|
|
754
|
+
};
|
|
741
755
|
//# sourceMappingURL=git-issues.js.map
|