@staff0rd/assist 0.89.0 → 0.89.2

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.
Files changed (2) hide show
  1. package/dist/index.js +11 -7
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import { Command } from "commander";
6
6
  // package.json
7
7
  var package_default = {
8
8
  name: "@staff0rd/assist",
9
- version: "0.89.0",
9
+ version: "0.89.2",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
@@ -2250,6 +2250,11 @@ function printVerboseDetails(item) {
2250
2250
  }
2251
2251
  console.log();
2252
2252
  }
2253
+ function filterItems(items, options2) {
2254
+ if (options2.status) return items.filter((i) => i.status === options2.status);
2255
+ if (!options2.all) return items.filter((i) => i.status !== "done");
2256
+ return items;
2257
+ }
2253
2258
  async function list2(options2) {
2254
2259
  const backlogPath = getBacklogPath();
2255
2260
  if (!existsSync14(backlogPath)) {
@@ -2260,10 +2265,7 @@ async function list2(options2) {
2260
2265
  );
2261
2266
  return;
2262
2267
  }
2263
- let items = loadBacklog();
2264
- if (options2.status) {
2265
- items = items.filter((item) => item.status === options2.status);
2266
- }
2268
+ const items = filterItems(loadBacklog(), options2);
2267
2269
  if (items.length === 0) {
2268
2270
  console.log(chalk27.dim("Backlog is empty."));
2269
2271
  return;
@@ -2460,7 +2462,7 @@ async function web(options2) {
2460
2462
  function registerBacklog(program2) {
2461
2463
  const backlogCommand = program2.command("backlog").description("Manage a backlog of work items").action(() => web({ port: "3000" }));
2462
2464
  backlogCommand.command("init").description("Create an empty assist.backlog.yml").action(init6);
2463
- backlogCommand.command("list").description("List all backlog items").option("--status <type>", "Filter by status (todo, in-progress, done)").option("-v, --verbose", "Show all item details").action(list2);
2465
+ backlogCommand.command("list").description("List all backlog items").option("--status <type>", "Filter by status (todo, in-progress, done)").option("-a, --all", "Include done items").option("-v, --verbose", "Show all item details").action(list2);
2464
2466
  backlogCommand.command("add").description("Add a new backlog item").action(add);
2465
2467
  backlogCommand.command("start <id>").description("Set a backlog item to in-progress").action(start);
2466
2468
  backlogCommand.command("done <id>").description("Set a backlog item to done").action(done);
@@ -3642,7 +3644,9 @@ function fetchThreadIds(org, repo, prNumber) {
3642
3644
  // src/commands/prs/listComments/fetchReviewComments.ts
3643
3645
  import { execSync as execSync21 } from "child_process";
3644
3646
  function fetchJson(endpoint) {
3645
- const result = execSync21(`gh api ${endpoint}`, { encoding: "utf-8" });
3647
+ const result = execSync21(`gh api --paginate ${endpoint}`, {
3648
+ encoding: "utf-8"
3649
+ });
3646
3650
  if (!result.trim()) return [];
3647
3651
  return JSON.parse(result);
3648
3652
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staff0rd/assist",
3
- "version": "0.89.0",
3
+ "version": "0.89.2",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {