patchrelay 0.54.1 → 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 +15 -17
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,
|
package/package.json
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "patchrelay",
|
|
3
|
-
"version": "0.54.
|
|
3
|
+
"version": "0.54.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"packageManager": "pnpm@10.28.2",
|
|
7
6
|
"repository": {
|
|
8
7
|
"type": "git",
|
|
9
8
|
"url": "git+https://github.com/krasnoperov/patchrelay.git"
|
|
@@ -29,20 +28,6 @@
|
|
|
29
28
|
"packages/merge-steward",
|
|
30
29
|
"packages/review-quill"
|
|
31
30
|
],
|
|
32
|
-
"scripts": {
|
|
33
|
-
"dev": "node --watch --experimental-transform-types src/index.ts",
|
|
34
|
-
"build": "rm -rf dist && tsgo -p tsconfig.json && chmod +x dist/index.js && node scripts/write-build-info.mjs",
|
|
35
|
-
"prepack": "pnpm build",
|
|
36
|
-
"start": "node dist/index.js serve",
|
|
37
|
-
"doctor": "node dist/index.js doctor",
|
|
38
|
-
"restart": "node dist/index.js service restart",
|
|
39
|
-
"deploy": "pnpm build && npm install -g . && node dist/index.js service restart",
|
|
40
|
-
"lint": "oxlint --ignore-path .gitignore .",
|
|
41
|
-
"typecheck": "tsgo -p tsconfig.json --noEmit",
|
|
42
|
-
"check": "pnpm typecheck",
|
|
43
|
-
"test": "node --experimental-transform-types --test 'test/**/*.test.ts'",
|
|
44
|
-
"ci": "pnpm lint && pnpm check && pnpm test && pnpm build"
|
|
45
|
-
},
|
|
46
31
|
"dependencies": {
|
|
47
32
|
"fastify": "^5.8.5",
|
|
48
33
|
"fastify-raw-body": "^5.0.0",
|
|
@@ -57,5 +42,18 @@
|
|
|
57
42
|
"@types/react": "^19.2.14",
|
|
58
43
|
"@typescript/native-preview": "7.0.0-dev.20260427.1",
|
|
59
44
|
"oxlint": "^1.62.0"
|
|
45
|
+
},
|
|
46
|
+
"scripts": {
|
|
47
|
+
"dev": "node --watch --experimental-transform-types src/index.ts",
|
|
48
|
+
"build": "rm -rf dist && tsgo -p tsconfig.json && chmod +x dist/index.js && node scripts/write-build-info.mjs",
|
|
49
|
+
"start": "node dist/index.js serve",
|
|
50
|
+
"doctor": "node dist/index.js doctor",
|
|
51
|
+
"restart": "node dist/index.js service restart",
|
|
52
|
+
"deploy": "pnpm build && pnpm add -g . && node dist/index.js service restart",
|
|
53
|
+
"lint": "oxlint --ignore-path .gitignore .",
|
|
54
|
+
"typecheck": "tsgo -p tsconfig.json --noEmit",
|
|
55
|
+
"check": "pnpm typecheck",
|
|
56
|
+
"test": "node --experimental-transform-types --test 'test/**/*.test.ts'",
|
|
57
|
+
"ci": "pnpm lint && pnpm check && pnpm test && pnpm build"
|
|
60
58
|
}
|
|
61
|
-
}
|
|
59
|
+
}
|