claude-task-worker 0.75.0 → 0.77.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 +19 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1499,6 +1499,14 @@ async function hasLabel(type, number, label) {
|
|
|
1499
1499
|
return labels.some((l) => l.name === label);
|
|
1500
1500
|
});
|
|
1501
1501
|
}
|
|
1502
|
+
async function hasOpenBlockers(issueNumber) {
|
|
1503
|
+
return withRetry(async () => {
|
|
1504
|
+
const output = await execGh(["issue", "view", String(issueNumber), "--json", "blockedBy"]);
|
|
1505
|
+
const parsed = JSON.parse(output);
|
|
1506
|
+
const nodes = parsed?.blockedBy?.nodes ?? [];
|
|
1507
|
+
return nodes.some((node) => node.state === "OPEN");
|
|
1508
|
+
});
|
|
1509
|
+
}
|
|
1502
1510
|
async function removeLabel(type, number, label) {
|
|
1503
1511
|
await withRetry(async () => {
|
|
1504
1512
|
try {
|
|
@@ -3114,6 +3122,16 @@ function createIssuePollingWorker(config) {
|
|
|
3114
3122
|
for (const issue of candidates) {
|
|
3115
3123
|
if (isRunning(issue.number)) continue;
|
|
3116
3124
|
if (isWorkerAtCapacity(config.name)) break;
|
|
3125
|
+
let blocked = false;
|
|
3126
|
+
try {
|
|
3127
|
+
blocked = await hasOpenBlockers(issue.number);
|
|
3128
|
+
} catch (err) {
|
|
3129
|
+
console.error(`[${config.name}] hasOpenBlockers failed for #${issue.number}: ${err}`);
|
|
3130
|
+
}
|
|
3131
|
+
if (blocked) {
|
|
3132
|
+
console.log(`[${config.name}] #${issue.number}: skipped (blocked by an open issue)`);
|
|
3133
|
+
continue;
|
|
3134
|
+
}
|
|
3117
3135
|
if (config.preflight) {
|
|
3118
3136
|
const action = await config.preflight(issue);
|
|
3119
3137
|
if (action === "skip") continue;
|
|
@@ -4240,7 +4258,7 @@ Example:
|
|
|
4240
4258
|
claude-task-worker all --label priority-high --label needs-design
|
|
4241
4259
|
claude-task-worker yolo --epic 100 --epic 200 --label priority-high
|
|
4242
4260
|
claude-task-worker all --project all
|
|
4243
|
-
claude-task-worker all --project
|
|
4261
|
+
claude-task-worker all --project web
|
|
4244
4262
|
claude-task-worker exec-issue --project my-app --epic 100`);
|
|
4245
4263
|
}
|
|
4246
4264
|
var workerType = process.argv[2];
|