@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
|
@@ -223,7 +223,14 @@ describe("prd status mappers", () => {
|
|
|
223
223
|
expect(prdStatusToLabel("ARCHIVED")).toBeNull();
|
|
224
224
|
});
|
|
225
225
|
|
|
226
|
-
test("labelToPrdStatus detects
|
|
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",
|
|
@@ -23,7 +23,10 @@ export function labelToPrdStatus(
|
|
|
23
23
|
labels: string[],
|
|
24
24
|
isClosed: boolean,
|
|
25
25
|
): PrdStatus {
|
|
26
|
-
if (isClosed)
|
|
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))
|