lalph 0.3.25 → 0.3.26
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/cli.mjs +13 -5
- package/package.json +1 -1
- package/src/Github.ts +35 -3
- package/src/domain/CliAgent.ts +1 -0
package/dist/cli.mjs
CHANGED
|
@@ -68841,6 +68841,7 @@ const claude = new CliAgent({
|
|
|
68841
68841
|
"--disallowed-tools",
|
|
68842
68842
|
"AskUserQuestion",
|
|
68843
68843
|
...extraArgs,
|
|
68844
|
+
"--",
|
|
68844
68845
|
`@${prdFilePath}
|
|
68845
68846
|
|
|
68846
68847
|
${prompt}`
|
|
@@ -154317,22 +154318,29 @@ const GithubIssueSource = effect$1(IssueSource, gen(function* () {
|
|
|
154317
154318
|
updateIssue: fnUntraced(function* (options) {
|
|
154318
154319
|
const { labelFilter, autoMergeLabelName } = yield* get$7(projectSettings, options.projectId);
|
|
154319
154320
|
const issueNumber = Number(options.issueId.slice(1));
|
|
154321
|
+
const currentIssue = yield* github.request((rest) => rest.issues.get({
|
|
154322
|
+
owner: cli.owner,
|
|
154323
|
+
repo: cli.repo,
|
|
154324
|
+
issue_number: issueNumber
|
|
154325
|
+
}));
|
|
154326
|
+
const labels = Array.from(new Set([...currentIssue.data.labels.flatMap((label) => typeof label === "string" ? [label] : label.name ? [label.name] : []), ...toArray(labelFilter)]));
|
|
154320
154327
|
const update = {
|
|
154321
154328
|
owner: cli.owner,
|
|
154322
154329
|
repo: cli.repo,
|
|
154323
154330
|
issue_number: issueNumber,
|
|
154324
|
-
labels
|
|
154331
|
+
labels
|
|
154325
154332
|
};
|
|
154326
154333
|
if (options.title) update.title = options.title;
|
|
154327
154334
|
if (options.description) update.body = options.description;
|
|
154328
154335
|
if (options.state) {
|
|
154329
154336
|
update.state = options.state === "done" ? "closed" : "open";
|
|
154337
|
+
update.labels = update.labels.filter((label) => label !== "in-review" && label !== "in-progress");
|
|
154330
154338
|
if (options.state === "in-review") update.labels.push("in-review");
|
|
154331
154339
|
else if (options.state === "in-progress") update.labels.push("in-progress");
|
|
154332
154340
|
}
|
|
154333
|
-
if (options.autoMerge !== void 0) {
|
|
154334
|
-
if (
|
|
154335
|
-
}
|
|
154341
|
+
if (options.autoMerge !== void 0 && isSome(autoMergeLabelName)) if (options.autoMerge) {
|
|
154342
|
+
if (!update.labels.includes(autoMergeLabelName.value)) update.labels.push(autoMergeLabelName.value);
|
|
154343
|
+
} else update.labels = update.labels.filter((label) => label !== autoMergeLabelName.value);
|
|
154336
154344
|
yield* updateIssue(update);
|
|
154337
154345
|
if (options.blockedBy !== void 0) {
|
|
154338
154346
|
const desiredBlockedBy = options.blockedBy;
|
|
@@ -155972,7 +155980,7 @@ const commandSource = make$36("source").pipe(withDescription("Select the issue s
|
|
|
155972
155980
|
|
|
155973
155981
|
//#endregion
|
|
155974
155982
|
//#region package.json
|
|
155975
|
-
var version = "0.3.
|
|
155983
|
+
var version = "0.3.26";
|
|
155976
155984
|
|
|
155977
155985
|
//#endregion
|
|
155978
155986
|
//#region src/commands/projects/ls.ts
|
package/package.json
CHANGED
package/src/Github.ts
CHANGED
|
@@ -325,6 +325,25 @@ export const GithubIssueSource = Layer.effect(
|
|
|
325
325
|
options.projectId,
|
|
326
326
|
)
|
|
327
327
|
const issueNumber = Number(options.issueId.slice(1))
|
|
328
|
+
const currentIssue = yield* github.request((rest) =>
|
|
329
|
+
rest.issues.get({
|
|
330
|
+
owner: cli.owner,
|
|
331
|
+
repo: cli.repo,
|
|
332
|
+
issue_number: issueNumber,
|
|
333
|
+
}),
|
|
334
|
+
)
|
|
335
|
+
const labels = Array.from(
|
|
336
|
+
new Set([
|
|
337
|
+
...currentIssue.data.labels.flatMap((label) =>
|
|
338
|
+
typeof label === "string"
|
|
339
|
+
? [label]
|
|
340
|
+
: label.name
|
|
341
|
+
? [label.name]
|
|
342
|
+
: [],
|
|
343
|
+
),
|
|
344
|
+
...Option.toArray(labelFilter),
|
|
345
|
+
]),
|
|
346
|
+
)
|
|
328
347
|
const update: {
|
|
329
348
|
owner: string
|
|
330
349
|
repo: string
|
|
@@ -337,7 +356,7 @@ export const GithubIssueSource = Layer.effect(
|
|
|
337
356
|
owner: cli.owner,
|
|
338
357
|
repo: cli.repo,
|
|
339
358
|
issue_number: issueNumber,
|
|
340
|
-
labels
|
|
359
|
+
labels,
|
|
341
360
|
}
|
|
342
361
|
|
|
343
362
|
if (options.title) {
|
|
@@ -349,15 +368,28 @@ export const GithubIssueSource = Layer.effect(
|
|
|
349
368
|
if (options.state) {
|
|
350
369
|
update.state = options.state === "done" ? "closed" : "open"
|
|
351
370
|
|
|
371
|
+
update.labels = update.labels.filter(
|
|
372
|
+
(label) => label !== "in-review" && label !== "in-progress",
|
|
373
|
+
)
|
|
374
|
+
|
|
352
375
|
if (options.state === "in-review") {
|
|
353
376
|
update.labels.push("in-review")
|
|
354
377
|
} else if (options.state === "in-progress") {
|
|
355
378
|
update.labels.push("in-progress")
|
|
356
379
|
}
|
|
357
380
|
}
|
|
358
|
-
if (
|
|
381
|
+
if (
|
|
382
|
+
options.autoMerge !== undefined &&
|
|
383
|
+
Option.isSome(autoMergeLabelName)
|
|
384
|
+
) {
|
|
359
385
|
if (options.autoMerge) {
|
|
360
|
-
update.labels.
|
|
386
|
+
if (!update.labels.includes(autoMergeLabelName.value)) {
|
|
387
|
+
update.labels.push(autoMergeLabelName.value)
|
|
388
|
+
}
|
|
389
|
+
} else {
|
|
390
|
+
update.labels = update.labels.filter(
|
|
391
|
+
(label) => label !== autoMergeLabelName.value,
|
|
392
|
+
)
|
|
361
393
|
}
|
|
362
394
|
}
|
|
363
395
|
|