patchrelay 0.54.2 → 0.54.3
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/build-info.json +3 -3
- package/dist/db/issue-store.js +31 -0
- package/dist/webhook-handler.js +8 -0
- package/package.json +1 -1
package/dist/build-info.json
CHANGED
package/dist/db/issue-store.js
CHANGED
|
@@ -426,6 +426,37 @@ export class IssueStore {
|
|
|
426
426
|
insert.run(params.projectId, params.linearIssueId, blocker.blockerLinearIssueId, blocker.blockerIssueKey ?? null, blocker.blockerTitle ?? null, blocker.blockerCurrentLinearState ?? null, blocker.blockerCurrentLinearStateType ?? null, now);
|
|
427
427
|
}
|
|
428
428
|
}
|
|
429
|
+
updateDependencyBlockerSnapshot(params) {
|
|
430
|
+
const sets = ["updated_at = @now"];
|
|
431
|
+
const values = {
|
|
432
|
+
now: isoNow(),
|
|
433
|
+
projectId: params.projectId,
|
|
434
|
+
blockerLinearIssueId: params.blockerLinearIssueId,
|
|
435
|
+
};
|
|
436
|
+
if (params.blockerIssueKey !== undefined) {
|
|
437
|
+
sets.push("blocker_issue_key = COALESCE(@blockerIssueKey, blocker_issue_key)");
|
|
438
|
+
values.blockerIssueKey = params.blockerIssueKey;
|
|
439
|
+
}
|
|
440
|
+
if (params.blockerTitle !== undefined) {
|
|
441
|
+
sets.push("blocker_title = COALESCE(@blockerTitle, blocker_title)");
|
|
442
|
+
values.blockerTitle = params.blockerTitle;
|
|
443
|
+
}
|
|
444
|
+
if (params.blockerCurrentLinearState !== undefined) {
|
|
445
|
+
sets.push("blocker_current_linear_state = COALESCE(@blockerCurrentLinearState, blocker_current_linear_state)");
|
|
446
|
+
values.blockerCurrentLinearState = params.blockerCurrentLinearState;
|
|
447
|
+
}
|
|
448
|
+
if (params.blockerCurrentLinearStateType !== undefined) {
|
|
449
|
+
sets.push("blocker_current_linear_state_type = COALESCE(@blockerCurrentLinearStateType, blocker_current_linear_state_type)");
|
|
450
|
+
values.blockerCurrentLinearStateType = params.blockerCurrentLinearStateType;
|
|
451
|
+
}
|
|
452
|
+
const result = this.connection.prepare(`
|
|
453
|
+
UPDATE issue_dependencies
|
|
454
|
+
SET ${sets.join(", ")}
|
|
455
|
+
WHERE project_id = @projectId
|
|
456
|
+
AND blocker_linear_issue_id = @blockerLinearIssueId
|
|
457
|
+
`).run(values);
|
|
458
|
+
return Number(result.changes);
|
|
459
|
+
}
|
|
429
460
|
listIssueDependencies(projectId, linearIssueId) {
|
|
430
461
|
const rows = this.connection.prepare(`
|
|
431
462
|
SELECT
|
package/dist/webhook-handler.js
CHANGED
|
@@ -108,6 +108,14 @@ export class WebhookHandler {
|
|
|
108
108
|
this.db.webhookEvents.assignWebhookProject(webhookEventId, project.id);
|
|
109
109
|
const hydrated = normalized;
|
|
110
110
|
const issue = hydrated.issue ?? routedIssue;
|
|
111
|
+
this.db.issues.updateDependencyBlockerSnapshot({
|
|
112
|
+
projectId: project.id,
|
|
113
|
+
blockerLinearIssueId: issue.id,
|
|
114
|
+
...(issue.identifier ? { blockerIssueKey: issue.identifier } : {}),
|
|
115
|
+
...(issue.title ? { blockerTitle: issue.title } : {}),
|
|
116
|
+
...(issue.stateName ? { blockerCurrentLinearState: issue.stateName } : {}),
|
|
117
|
+
...(issue.stateType ? { blockerCurrentLinearStateType: issue.stateType } : {}),
|
|
118
|
+
});
|
|
111
119
|
// Record desired stage and upsert issue
|
|
112
120
|
const result = await this.desiredStageRecorder.record({
|
|
113
121
|
project,
|