@staff0rd/assist 0.726.0 → 0.727.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 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.726.0",
9
+ version: "0.727.0",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
@@ -13699,6 +13699,32 @@ function ghJson(cwd, args) {
13699
13699
  return result;
13700
13700
  }
13701
13701
 
13702
+ // src/commands/sessions/web/next/fetchAssignedIssues.ts
13703
+ async function fetchAssignedIssues(cwd) {
13704
+ const issues = await ghJson(cwd, [
13705
+ "issue",
13706
+ "list",
13707
+ "--assignee",
13708
+ "@me",
13709
+ "--state",
13710
+ "open",
13711
+ "--limit",
13712
+ "100",
13713
+ "--json",
13714
+ "number,title,url,createdAt,author,labels"
13715
+ ]);
13716
+ return issues.map((issue) => ({
13717
+ number: issue.number,
13718
+ title: issue.title,
13719
+ url: issue.url,
13720
+ createdAt: issue.createdAt,
13721
+ author: issue.author?.login ?? "unknown",
13722
+ labels: (issue.labels ?? []).flatMap(
13723
+ (label2) => label2.name ? [label2.name] : []
13724
+ )
13725
+ })).sort((a, b) => a.createdAt.localeCompare(b.createdAt));
13726
+ }
13727
+
13702
13728
  // src/commands/sessions/web/next/peerPrsQuery.ts
13703
13729
  var peerPrsQuery = `query($owner: String!, $name: String!) {
13704
13730
  viewer { login }
@@ -13833,9 +13859,11 @@ async function nextItems(req, res) {
13833
13859
  const cwd = getCwdParam(req, res);
13834
13860
  if (!cwd) return;
13835
13861
  const peers = loadConfigFrom(cwd).next?.peers ?? [];
13836
- const body = {
13837
- peerPrs: await section(() => fetchPeerPrs(cwd, peers))
13838
- };
13862
+ const [peerPrs, assignedIssues] = await Promise.all([
13863
+ section(() => fetchPeerPrs(cwd, peers)),
13864
+ section(() => fetchAssignedIssues(cwd))
13865
+ ]);
13866
+ const body = { peerPrs, assignedIssues };
13839
13867
  respondJson(res, 200, body);
13840
13868
  }
13841
13869
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staff0rd/assist",
3
- "version": "0.726.0",
3
+ "version": "0.727.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {