Skip to content

Commit f1fda78

Browse files
style: auto-fix lint and formatting
1 parent bf1bdd9 commit f1fda78

File tree

17 files changed

+225
-113
lines changed

17 files changed

+225
-113
lines changed

.bot/AGENT.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,14 @@ For those private repos you have to use gh-cli to fetch the content:
8181
For every deliverable you produce, follow this exact sequence:
8282

8383
**Step 1 — Save to workspace:**
84+
8485
```bash
8586
# Always name files: deliverable-<name>.md
8687
# Examples: deliverable-research-report.md, deliverable-analysis.md, deliverable-summary.md
8788
```
8889

8990
**Step 2 — Post to Slack immediately after saving:**
91+
9092
```bash
9193
# Smart-post: auto-detects short vs long content
9294
# Short (≤ 2900 chars) → posts inline as a message
@@ -100,6 +102,7 @@ prbot slack post \
100102
```
101103

102104
**Rules:**
105+
103106
- **ALWAYS** do both steps together — save then post, never save without posting
104107
- Post to the **same thread** where the user asked (`--thread=${QUICK_RESPOND_MSG_TS}`)
105108
- Use `--channel=${EVENT_CHANNEL}` (already set in your environment)
@@ -112,6 +115,7 @@ prbot slack post \
112115
When a tool or prbot CLI command fails, follow this process:
113116

114117
1. **Record** the full error to `./TOOLS_ERRORS.md`:
118+
115119
```
116120
## [timestamp] Error: <tool/command name>
117121
**Command:** `<exact command that failed>`
@@ -126,6 +130,7 @@ When a tool or prbot CLI command fails, follow this process:
126130
- For other CLI errors → read `bot/cli.ts`
127131

128132
3. **Fix** the tool by spawning a prbot sub-agent with a detailed prompt that includes the exact error, root cause analysis, and the fix needed:
133+
129134
```bash
130135
prbot pr --repo=Comfy-Org/Comfy-PR --prompt="Fix tool error in <file>: <exact error>. Root cause: <your analysis>. Fix: <what to change>. Test by running: <how to verify>"
131136
```

app/tasks/gh-core-tag-notification/index.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,13 @@ const save = async (task: { tagName: string } & Partial<GithubCoreTagNotificatio
6969
tagName: normalizedTask.tagName,
7070
});
7171

72-
return (await GithubCoreTagNotificationTask.findOneAndUpdate(
73-
existing ? { _id: existing._id } : { tagName: normalizedTask.tagName },
74-
{ $set: normalizedTask },
75-
{ upsert: true, returnDocument: "after" },
76-
)) || DIE("never");
72+
return (
73+
(await GithubCoreTagNotificationTask.findOneAndUpdate(
74+
existing ? { _id: existing._id } : { tagName: normalizedTask.tagName },
75+
{ $set: normalizedTask },
76+
{ upsert: true, returnDocument: "after" },
77+
)) || DIE("never")
78+
);
7779
};
7880

7981
if (import.meta.main) {

app/tasks/gh-desktop-release-notification/index.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,13 @@ const save = async (task: { url: string } & Partial<GithubReleaseNotificationTas
6464
$or: [{ url: normalizedTask.url }, { url: oldUrl }],
6565
});
6666

67-
return (await GithubReleaseNotificationTask.findOneAndUpdate(
68-
existing ? { _id: existing._id } : { url: normalizedTask.url },
69-
{ $set: normalizedTask },
70-
{ upsert: true, returnDocument: "after" },
71-
)) || DIE("never");
67+
return (
68+
(await GithubReleaseNotificationTask.findOneAndUpdate(
69+
existing ? { _id: existing._id } : { url: normalizedTask.url },
70+
{ $set: normalizedTask },
71+
{ upsert: true, returnDocument: "after" },
72+
)) || DIE("never")
73+
);
7274
};
7375

7476
if (import.meta.main) {

app/tasks/gh-frontend-release-notification/index.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,13 @@ const save = async (task: { url: string } & Partial<GithubFrontendReleaseNotific
6464
$or: [{ url: normalizedTask.url }, { url: oldUrl }],
6565
});
6666

67-
return (await GithubFrontendReleaseNotificationTask.findOneAndUpdate(
68-
existing ? { _id: existing._id } : { url: normalizedTask.url },
69-
{ $set: normalizedTask },
70-
{ upsert: true, returnDocument: "after" },
71-
)) || DIE("never");
67+
return (
68+
(await GithubFrontendReleaseNotificationTask.findOneAndUpdate(
69+
existing ? { _id: existing._id } : { url: normalizedTask.url },
70+
{ $set: normalizedTask },
71+
{ upsert: true, returnDocument: "after" },
72+
)) || DIE("never")
73+
);
7274
};
7375

7476
if (import.meta.main) {

app/tasks/gh-issue-transfer-comfyui-to-desktop/index.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,21 @@ const save = async (
6565
...(normalizedTask.sourceIssueUrl
6666
? [
6767
{ sourceIssueUrl: normalizedTask.sourceIssueUrl },
68-
{ sourceIssueUrl: normalizedTask.sourceIssueUrl.replace(/Comfy-Org/i, "comfyanonymous") },
68+
{
69+
sourceIssueUrl: normalizedTask.sourceIssueUrl.replace(/Comfy-Org/i, "comfyanonymous"),
70+
},
6971
]
7072
: []),
7173
],
7274
});
7375

74-
return (await GithubComfyUIToDesktopIssueTransferTask.findOneAndUpdate(
75-
existing ? { _id: existing._id } : { sourceIssueNumber: normalizedTask.sourceIssueNumber },
76-
{ $set: normalizedTask },
77-
{ upsert: true, returnDocument: "after" },
78-
)) || DIE("never");
76+
return (
77+
(await GithubComfyUIToDesktopIssueTransferTask.findOneAndUpdate(
78+
existing ? { _id: existing._id } : { sourceIssueNumber: normalizedTask.sourceIssueNumber },
79+
{ $set: normalizedTask },
80+
{ upsert: true, returnDocument: "after" },
81+
)) || DIE("never")
82+
);
7983
};
8084

8185
if (import.meta.main) {

app/tasks/gh-issue-transfer-comfyui-to-frontend/index.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,21 @@ const save = async (
6464
...(normalizedTask.sourceIssueUrl
6565
? [
6666
{ sourceIssueUrl: normalizedTask.sourceIssueUrl },
67-
{ sourceIssueUrl: normalizedTask.sourceIssueUrl.replace(/Comfy-Org/i, "comfyanonymous") },
67+
{
68+
sourceIssueUrl: normalizedTask.sourceIssueUrl.replace(/Comfy-Org/i, "comfyanonymous"),
69+
},
6870
]
6971
: []),
7072
],
7173
});
7274

73-
return (await GithubFrontendIssueTransferTask.findOneAndUpdate(
74-
existing ? { _id: existing._id } : { sourceIssueNumber: normalizedTask.sourceIssueNumber },
75-
{ $set: normalizedTask },
76-
{ upsert: true, returnDocument: "after" },
77-
)) || DIE("never");
75+
return (
76+
(await GithubFrontendIssueTransferTask.findOneAndUpdate(
77+
existing ? { _id: existing._id } : { sourceIssueNumber: normalizedTask.sourceIssueNumber },
78+
{ $set: normalizedTask },
79+
{ upsert: true, returnDocument: "after" },
80+
)) || DIE("never")
81+
);
7882
};
7983

8084
if (import.meta.main) {

app/tasks/gh-issue-transfer-comfyui-to-workflow_templates/index.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,17 +67,21 @@ const save = async (
6767
...(normalizedTask.sourceIssueUrl
6868
? [
6969
{ sourceIssueUrl: normalizedTask.sourceIssueUrl },
70-
{ sourceIssueUrl: normalizedTask.sourceIssueUrl.replace(/Comfy-Org/i, "comfyanonymous") },
70+
{
71+
sourceIssueUrl: normalizedTask.sourceIssueUrl.replace(/Comfy-Org/i, "comfyanonymous"),
72+
},
7173
]
7274
: []),
7375
],
7476
});
7577

76-
return (await GithubWorkflowTemplatesIssueTransferTask.findOneAndUpdate(
77-
existing ? { _id: existing._id } : { sourceIssueNumber: normalizedTask.sourceIssueNumber },
78-
{ $set: normalizedTask },
79-
{ upsert: true, returnDocument: "after" },
80-
)) || DIE("never");
78+
return (
79+
(await GithubWorkflowTemplatesIssueTransferTask.findOneAndUpdate(
80+
existing ? { _id: existing._id } : { sourceIssueNumber: normalizedTask.sourceIssueNumber },
81+
{ $set: normalizedTask },
82+
{ upsert: true, returnDocument: "after" },
83+
)) || DIE("never")
84+
);
8185
};
8286

8387
if (import.meta.main) {

app/tasks/gh-issue-transfer-desktop-to-frontend/index.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,21 @@ const save = async (
6363
...(normalizedTask.sourceIssueUrl
6464
? [
6565
{ sourceIssueUrl: normalizedTask.sourceIssueUrl },
66-
{ sourceIssueUrl: normalizedTask.sourceIssueUrl.replace(/Comfy-Org/i, "comfyanonymous") },
66+
{
67+
sourceIssueUrl: normalizedTask.sourceIssueUrl.replace(/Comfy-Org/i, "comfyanonymous"),
68+
},
6769
]
6870
: []),
6971
],
7072
});
7173

72-
return (await GithubDesktopIssueTransferTask.findOneAndUpdate(
73-
existing ? { _id: existing._id } : { sourceIssueNumber: normalizedTask.sourceIssueNumber },
74-
{ $set: normalizedTask },
75-
{ upsert: true, returnDocument: "after" },
76-
)) || DIE("never");
74+
return (
75+
(await GithubDesktopIssueTransferTask.findOneAndUpdate(
76+
existing ? { _id: existing._id } : { sourceIssueNumber: normalizedTask.sourceIssueNumber },
77+
{ $set: normalizedTask },
78+
{ upsert: true, returnDocument: "after" },
79+
)) || DIE("never")
80+
);
7781
};
7882

7983
if (import.meta.main) {

app/tasks/gh-issue-transfer-frontend-to-comfyui/index.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,17 +67,21 @@ const save = async (
6767
...(normalizedTask.sourceIssueUrl
6868
? [
6969
{ sourceIssueUrl: normalizedTask.sourceIssueUrl },
70-
{ sourceIssueUrl: normalizedTask.sourceIssueUrl.replace(/Comfy-Org/i, "comfyanonymous") },
70+
{
71+
sourceIssueUrl: normalizedTask.sourceIssueUrl.replace(/Comfy-Org/i, "comfyanonymous"),
72+
},
7173
]
7274
: []),
7375
],
7476
});
7577

76-
return (await GithubFrontendToComfyuiIssueTransferTask.findOneAndUpdate(
77-
existing ? { _id: existing._id } : { sourceIssueNumber: normalizedTask.sourceIssueNumber },
78-
{ $set: normalizedTask },
79-
{ upsert: true, returnDocument: "after" },
80-
)) || DIE("never");
78+
return (
79+
(await GithubFrontendToComfyuiIssueTransferTask.findOneAndUpdate(
80+
existing ? { _id: existing._id } : { sourceIssueNumber: normalizedTask.sourceIssueNumber },
81+
{ $set: normalizedTask },
82+
{ upsert: true, returnDocument: "after" },
83+
)) || DIE("never")
84+
);
8185
};
8286

8387
if (import.meta.main) {

app/tasks/gh-issue-transfer-frontend-to-desktop/index.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,17 +67,21 @@ const save = async (
6767
...(normalizedTask.sourceIssueUrl
6868
? [
6969
{ sourceIssueUrl: normalizedTask.sourceIssueUrl },
70-
{ sourceIssueUrl: normalizedTask.sourceIssueUrl.replace(/Comfy-Org/i, "comfyanonymous") },
70+
{
71+
sourceIssueUrl: normalizedTask.sourceIssueUrl.replace(/Comfy-Org/i, "comfyanonymous"),
72+
},
7173
]
7274
: []),
7375
],
7476
});
7577

76-
return (await GithubFrontendToDesktopIssueTransferTask.findOneAndUpdate(
77-
existing ? { _id: existing._id } : { sourceIssueNumber: normalizedTask.sourceIssueNumber },
78-
{ $set: normalizedTask },
79-
{ upsert: true, returnDocument: "after" },
80-
)) || DIE("never");
78+
return (
79+
(await GithubFrontendToDesktopIssueTransferTask.findOneAndUpdate(
80+
existing ? { _id: existing._id } : { sourceIssueNumber: normalizedTask.sourceIssueNumber },
81+
{ $set: normalizedTask },
82+
{ upsert: true, returnDocument: "after" },
83+
)) || DIE("never")
84+
);
8185
};
8286

8387
if (import.meta.main) {

0 commit comments

Comments
 (0)