@sentry/junior-linear 0.222.0 → 0.223.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/index.js +20 -11
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -166,11 +166,13 @@ function linearWebhookSecret() {
|
|
|
166
166
|
var saveIssueResultSchema = z2.object({
|
|
167
167
|
issue: z2.object({
|
|
168
168
|
identifier: z2.string().trim().min(1),
|
|
169
|
-
url: z2.url()
|
|
169
|
+
url: z2.url(),
|
|
170
|
+
title: z2.string().optional(),
|
|
171
|
+
status: z2.string().optional()
|
|
170
172
|
}).passthrough()
|
|
171
173
|
}).passthrough();
|
|
172
|
-
async function
|
|
173
|
-
if (ctx.tool.name !== "save_issue"
|
|
174
|
+
async function annotateSavedIssue(ctx) {
|
|
175
|
+
if (ctx.tool.name !== "save_issue") {
|
|
174
176
|
return;
|
|
175
177
|
}
|
|
176
178
|
if (!ctx.annotations) {
|
|
@@ -184,13 +186,20 @@ async function annotateCreatedIssue(ctx) {
|
|
|
184
186
|
return;
|
|
185
187
|
}
|
|
186
188
|
const identifier = result.data.issue.identifier.toUpperCase();
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
189
|
+
const issue = result.data.issue;
|
|
190
|
+
return {
|
|
191
|
+
objectAnnotations: [
|
|
192
|
+
{
|
|
193
|
+
kind: "object",
|
|
194
|
+
objectType: "task",
|
|
195
|
+
key: identifier,
|
|
196
|
+
label: identifier,
|
|
197
|
+
title: (issue.title || identifier).slice(0, 512),
|
|
198
|
+
url: issue.url,
|
|
199
|
+
status: issue.status
|
|
200
|
+
}
|
|
201
|
+
]
|
|
202
|
+
};
|
|
194
203
|
}
|
|
195
204
|
function linearPlugin() {
|
|
196
205
|
return defineJuniorPlugin({
|
|
@@ -227,7 +236,7 @@ function linearPlugin() {
|
|
|
227
236
|
name: "linear"
|
|
228
237
|
},
|
|
229
238
|
hooks: {
|
|
230
|
-
afterMcpTool:
|
|
239
|
+
afterMcpTool: annotateSavedIssue,
|
|
231
240
|
routes(ctx) {
|
|
232
241
|
return [
|
|
233
242
|
createLinearWebhookRoute({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/junior-linear",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.223.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"zod": "^4.5.4",
|
|
26
|
-
"@sentry/junior-plugin-api": "0.
|
|
26
|
+
"@sentry/junior-plugin-api": "0.223.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@oxlint/plugins": "1.79.0",
|