From dd3dd48969baa239c69a0f5a7d4b951dfe88bc0e Mon Sep 17 00:00:00 2001 From: Richard Zink Date: Tue, 17 Nov 2026 06:19:03 +0100 Subject: [PATCH] Factory: fix versioning (null pull_request hid open issues) Co-Authored-By: Claude Sonnet 5.5 --- CHANGELOG.md | 8 ++++++++ server/src/factory.rs | 2 +- web/src/whatsnew.ts | 4 ++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 76d65d0..0f8b9c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to CodeCraft. Versions follow [Semantic Versioning](https://semver.org/); until 1.0, minor versions may contain breaking changes. +## [Unreleased] + +### Fixed + +- **Factory versioning.** Open issues of the forge were never seen (Gitea sends `"pull_request": null`), so every + deliverable counted as the last of its milestone and raised the minor version. Now only the last open issue of a + milestone raises the minor version; all others raise the patch version. + ## [v202611-00051] – 2026-11-16 ### Added diff --git a/server/src/factory.rs b/server/src/factory.rs index a8bbfba..f5a34d2 100644 --- a/server/src/factory.rs +++ b/server/src/factory.rs @@ -540,7 +540,7 @@ impl Forge { let a = v.as_array().cloned().unwrap_or_default(); let n = a.len(); for i in a { - if i.get("pull_request").is_some() { + if !i.get("pull_request").map_or(true, |p| p.is_null()) { continue; } out.push((i[key].as_i64().unwrap_or(0), i["title"].as_str().unwrap_or("").to_string())); diff --git a/web/src/whatsnew.ts b/web/src/whatsnew.ts index 32de28f..a23ff71 100644 --- a/web/src/whatsnew.ts +++ b/web/src/whatsnew.ts @@ -3,6 +3,10 @@ * under "unreleased"; scripts/release.sh renames the key to the release version. */ export const WHATS_NEW: Record = { + unreleased: { + en: ["Factory: fixed versioning – deliverables raise the patch version, only the last one of a milestone raises the minor version"], + de: ["Factory: Versionierung korrigiert – Deliverables erhöhen die Patch-Version, nur das letzte eines Meilensteins die Minor-Version"], + }, "202611-00051": { en: ["Factory: close finished issues with a comment; the Done column moved to the right"], de: ["Factory: fertige Issues mit Kommentar schließen; die Spalte Fertig steht jetzt ganz rechts"],