@sentry/junior-linear 0.225.0 → 0.226.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 +26 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -163,12 +163,25 @@ function linearWebhookSecret() {
|
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
// src/plugin.ts
|
|
166
|
+
var namedFact = z2.union([z2.string(), z2.object({ name: z2.string() })]).nullish();
|
|
167
|
+
var short = (value) => {
|
|
168
|
+
const text = value?.trim();
|
|
169
|
+
return text ? text.length > 64 ? `${text.slice(0, 63)}\u2026` : text : void 0;
|
|
170
|
+
};
|
|
171
|
+
var factName = (value) => short(typeof value === "string" ? value : value?.name);
|
|
166
172
|
var saveIssueResultSchema = z2.object({
|
|
167
173
|
issue: z2.object({
|
|
168
174
|
identifier: z2.string().trim().min(1),
|
|
169
175
|
url: z2.url(),
|
|
170
176
|
title: z2.string().optional(),
|
|
171
|
-
status: z2.string().optional()
|
|
177
|
+
status: z2.string().optional(),
|
|
178
|
+
assignee: namedFact,
|
|
179
|
+
priority: z2.union([z2.string(), z2.number(), z2.object({ name: z2.string() })]).nullish(),
|
|
180
|
+
project: namedFact,
|
|
181
|
+
cycle: namedFact,
|
|
182
|
+
labels: z2.array(namedFact).nullish(),
|
|
183
|
+
dueDate: z2.iso.date().nullish(),
|
|
184
|
+
updatedAt: z2.iso.datetime({ offset: true }).nullish()
|
|
172
185
|
}).passthrough()
|
|
173
186
|
}).passthrough();
|
|
174
187
|
async function annotateSavedIssue(ctx) {
|
|
@@ -196,7 +209,18 @@ async function annotateSavedIssue(ctx) {
|
|
|
196
209
|
label: identifier,
|
|
197
210
|
title: (issue.title || identifier).slice(0, 512),
|
|
198
211
|
url: issue.url,
|
|
199
|
-
status: issue.status
|
|
212
|
+
status: issue.status,
|
|
213
|
+
displayType: "Issue",
|
|
214
|
+
sourceUpdatedAt: issue.updatedAt ?? void 0,
|
|
215
|
+
facts: {
|
|
216
|
+
type: "task",
|
|
217
|
+
assignees: issue.assignee === void 0 ? void 0 : factName(issue.assignee) ? [factName(issue.assignee)] : [],
|
|
218
|
+
priority: typeof issue.priority === "number" ? ["No priority", "Urgent", "High", "Normal", "Low"][issue.priority] : factName(issue.priority),
|
|
219
|
+
project: factName(issue.project),
|
|
220
|
+
cycle: factName(issue.cycle),
|
|
221
|
+
dueDate: issue.dueDate ?? void 0,
|
|
222
|
+
labels: issue.labels?.slice(0, 5).map((label) => factName(label)).filter(Boolean)
|
|
223
|
+
}
|
|
200
224
|
}
|
|
201
225
|
]
|
|
202
226
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/junior-linear",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.226.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.226.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@oxlint/plugins": "1.79.0",
|