Decision-Update Changelog, Stufen 1 bis 3: - changelog:collect liest die Commits zwischen zwei Tags und legt aus den Zeilen Changelog:/Public: Entwürfe an (ganze Nachricht, nicht nur der Trailer-Block); ohne Changelog-Zeile intern, Sicherheit als eine Sammelzeile je Release, Sicherheitsbegriffe im Titel stufen hoch, ohne Public-Satz ein markierter Vorschlag aus dem Titel; idempotent. - changelog:backfill trägt die Neuerungen seit dem Relaunch als Entwurf nach. - Admin ▸ Changelog (settings:manage): gegenlesen, bearbeiten, Rubrik, artikelwürdig, freigeben/verwerfen, Tag gesammelt freigeben, Eintrag von Hand. - pressekonto.com/changelog und /changelog/feed (RSS), auf den Portalen 301 zum Hub; Kundenmenü „Was ist neu“ mit Neu-Kennzeichen (14 Tage). Changelog: Neu Public: Unter pressekonto.com/changelog steht, was sich auf pressekonto, presseecho und businessportal24 ändert – auch als RSS-Feed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
54 lines
1.8 KiB
PHP
54 lines
1.8 KiB
PHP
<?php
|
|
|
|
namespace App\Console\Commands;
|
|
|
|
use App\Enums\ChangelogCategory;
|
|
use App\Enums\ChangelogStatus;
|
|
use App\Models\ChangelogEntry;
|
|
use Illuminate\Console\Command;
|
|
|
|
/**
|
|
* Nachtrag des Changelogs seit dem Relaunch (Decision-Update Changelog, O7)
|
|
* aus `database/seeders/data/changelog-backfill.php` — als Entwurf, idempotent.
|
|
*/
|
|
class BackfillChangelog extends Command
|
|
{
|
|
protected $signature = 'changelog:backfill {--dry-run : nur zählen, nichts speichern}';
|
|
|
|
protected $description = 'Changelog-Einträge seit dem Relaunch als Entwurf nachtragen.';
|
|
|
|
public function handle(): int
|
|
{
|
|
/** @var list<array{date: string, tag: string|null, category: string, text: string}> $rows */
|
|
$rows = require database_path('seeders/data/changelog-backfill.php');
|
|
$created = 0;
|
|
|
|
foreach ($rows as $row) {
|
|
$key = 'backfill:'.sha1($row['date'].'|'.$row['category'].'|'.$row['text']);
|
|
|
|
if (ChangelogEntry::query()->where('source_key', $key)->exists()) {
|
|
continue;
|
|
}
|
|
|
|
$created++;
|
|
|
|
if ($this->option('dry-run')) {
|
|
continue;
|
|
}
|
|
|
|
ChangelogEntry::query()->create([
|
|
'released_on' => $row['date'],
|
|
'release_tag' => $row['tag'],
|
|
'category' => ChangelogCategory::from($row['category']),
|
|
'text' => $row['text'],
|
|
'status' => ChangelogStatus::Draft,
|
|
'source_key' => $key,
|
|
'review_note' => 'Nachtrag aus Protokoll und Roadmap — Datum und Text prüfen.',
|
|
]);
|
|
}
|
|
|
|
$this->info(sprintf('%s%d von %d Einträgen nachgetragen (Entwurf). Freigabe im Admin ▸ Changelog.', $this->option('dry-run') ? '[Dry-Run] ' : '', $created, count($rows)));
|
|
|
|
return self::SUCCESS;
|
|
}
|
|
}
|