@cliangdev/flux-plugin 0.4.0-dev.17634ed → 0.4.0-dev.a68828a

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cliangdev/flux-plugin",
3
- "version": "0.4.0-dev.17634ed",
3
+ "version": "0.4.0-dev.a68828a",
4
4
  "description": "Claude Code plugin for AI-first workflow orchestration with MCP server",
5
5
  "type": "module",
6
6
  "main": "./dist/server/index.js",
@@ -223,7 +223,14 @@ describe("prd status mappers", () => {
223
223
  expect(prdStatusToLabel("ARCHIVED")).toBeNull();
224
224
  });
225
225
 
226
- test("labelToPrdStatus detects ARCHIVED from closed state", async () => {
226
+ test("labelToPrdStatus detects COMPLETED from closed state with completed label", async () => {
227
+ const { labelToPrdStatus } = await import("../mappers/prd.js");
228
+ expect(labelToPrdStatus(["flux:prd", "status:completed"], true)).toBe(
229
+ "COMPLETED",
230
+ );
231
+ });
232
+
233
+ test("labelToPrdStatus detects ARCHIVED from closed state without completed label", async () => {
227
234
  const { labelToPrdStatus } = await import("../mappers/prd.js");
228
235
  expect(labelToPrdStatus(["flux:prd", "status:draft"], true)).toBe(
229
236
  "ARCHIVED",
@@ -362,7 +362,7 @@ export class GitHubAdapter implements BackendAdapter {
362
362
  updateParams.title = input.title;
363
363
  }
364
364
 
365
- if (newStatus === "ARCHIVED") {
365
+ if (newStatus === "COMPLETED" || newStatus === "ARCHIVED") {
366
366
  updateParams.state = "closed";
367
367
  }
368
368
 
@@ -23,7 +23,10 @@ export function labelToPrdStatus(
23
23
  labels: string[],
24
24
  isClosed: boolean,
25
25
  ): PrdStatus {
26
- if (isClosed) return "ARCHIVED";
26
+ if (isClosed) {
27
+ if (labels.includes(GITHUB_LABELS.STATUS_COMPLETED)) return "COMPLETED";
28
+ return "ARCHIVED";
29
+ }
27
30
 
28
31
  if (labels.includes(GITHUB_LABELS.STATUS_COMPLETED)) return "COMPLETED";
29
32
  if (labels.includes(GITHUB_LABELS.STATUS_BREAKDOWN_READY))