feat/prettier-postupgrade
A prettier version bump changes prettier's canonical output, so files that were correctly formatted under the old version now fail `prettier --check` in CI — the update PR goes red and never automerges. This happened on castaway with prettier 3.8.3 -> 3.9.6 (two files reformatted: a union type collapsed to one line, a Svelte closing tag pulled onto the attribute line). Add a npm-scoped postUpgradeTasks that runs `npm run format` once per branch after the upgrade and commits the result. `--if-present` makes it a no-op in npm repos without a format script; matchManagers npm keeps it away from the gradle/maven and firmware repos that share this preset. Requires the self-hosted Renovate instance to whitelist the command via allowedCommands (e.g. RENOVATE_ALLOWED_COMMANDS='^npm run format') — that is a global/self-hosted-only option and cannot be set from this preset. Signed-off-by: Peter Siegmund <peter.siegmund@entwicklung.eq-3.de>
renovate-config
Gemeinsames Renovate-Preset für alle Repos auf git.mars3142.dev.
Verwendung
In jedem überwachten Repo genügt eine renovate.json mit:
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["local>mars3142/renovate-config"]
}
local> löst gegen diese Gitea-Instanz auf und lädt die default.json aus diesem Repo.
Was das Preset macht
- Schedule: PRs nur Montag nachts (00:00–07:00, Europe/Berlin), max. 5 offene PRs gleichzeitig.
- Release-Age: Updates müssen 3 Tage alt sein (
minimumReleaseAge). Fängt zurückgezogene und kompromittierte Releases ab. MitinternalChecksFilter: strictentsteht in der Wartezeit gar nicht erst ein PR. - Security:
osvVulnerabilityAlertsals CVE-Kanal (Gitea hat kein Dependabot). Security-Updates umgehen Wartezeit und Schedule. - Automerge (via
platformAutomerge, mergt sobald die required checks grün sind):- npm
devDependencies, minor + patch, als eine gesammelte PR - CI actions
- Lockfile-Maintenance
- npm
- Nur gruppiert, kein Automerge: Svelte-/Frontend-Toolchain, Spring/Kotlin. Diese PRs schaut man sich an.
- Major-Updates: kein PR ohne Freigabe per Checkbox im Dependency Dashboard.
Abweichen pro Repo
Alles hinter dem extends überschreibt das Preset für dieses eine Repo:
{
"extends": ["local>mars3142/renovate-config"],
"schedule": ["at any time"]
}
Voraussetzung für Automerge
Der Renovate-User braucht Merge-Rechte, und die CI-Jobs müssen in der Branch Protection des Ziel-Branches als required status checks eingetragen sein. Ohne required checks würde Giteas Auto-Merge sofort mergen, ohne auf CI zu warten.
Description
Gemeinsames Renovate-Preset fuer alle Repos (Schedule, Gruppierung, Automerge, Release-Age)
51 KiB