Skip to content

Commit 36ac468

Browse files
deepracticexsclaude
andcommitted
fix(@issuexjs/node): return label names instead of UUIDs in getIssueLabels
Join issue_labels with labels table to return human-readable names. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent efcaad6 commit 36ac468

3 files changed

Lines changed: 11 additions & 4 deletions

File tree

packages/node/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# @issuexjs/node
22

3+
## 0.2.1
4+
5+
### Patch Changes
6+
7+
- Fix getIssueLabels to return label names instead of UUIDs by joining with labels table
8+
- @issuexjs/core@0.2.1
9+
310
## 0.2.0
411

512
### Minor Changes

packages/node/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@issuexjs/node",
3-
"version": "0.2.0",
3+
"version": "0.2.1",
44
"description": "IssueX Node.js/Bun SQLite Provider",
55
"repository": {
66
"type": "git",

packages/node/src/stores.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ function rowToIssue(row: IssueRow, labels: string[]): Issue {
6060
}
6161

6262
function getIssueLabels(db: Database, issueId: string): string[] {
63-
const rows = db.all<{ label_id: string }>(
64-
"SELECT label_id FROM issue_labels WHERE issue_id = ?",
63+
const rows = db.all<{ name: string }>(
64+
"SELECT l.name FROM issue_labels il JOIN labels l ON il.label_id = l.id WHERE il.issue_id = ?",
6565
issueId
6666
);
67-
return rows.map((r) => r.label_id);
67+
return rows.map((r) => r.name);
6868
}
6969

7070
// --- SQLite Store Implementations ---

0 commit comments

Comments
 (0)