Files
secustor ffbbfa962f refactor(platform): replace platform id checks with capability flags
Generic code tested platform ids to decide behaviour: `platform === 'local'` stood
for "there is no git remote", and `['github', 'gitea', 'gitlab'].includes(...)`
stood for "the platform renders HTML comments". Both are now optional flags on the
`Platform` interface, declared by each platform module in a `capabilities` object
and read through `supportsGit()` and `supportsHtmlComments()` from
`lib/modules/platform/capabilities.ts`, which `setPlatformApi()` fills in.

That helper module deliberately has no runtime import, so `lib/util/git` and
`lib/util/fs` can read the flags without closing an import cycle with
`lib/modules/platform/index.ts`, which imports `lib/util/git`.

Behaviour changes:

- Forgejo now declares `htmlComments: true`, like the Gitea platform it builds on.
  It was missing from the hard-coded list, so Renovate never rebased the onboarding
  branch on Forgejo and never read the onboarding rebase checkbox, even though
  Forgejo renders HTML comments and task lists exactly as Gitea does.
- Two error messages and one debug message now name the missing capability instead
  of `platform=local`.

Left on the platform id on purpose: `workers/global/autodiscover.ts` assigns the
literal repository name `'local'`, `workers/global/index.ts` builds the local
directory path from the id, and `config/app-strings.ts` derives
`.<platform>/renovate.json` file names from the id. None of those is a capability.

Finding: P18
2026-09-14 23:23:15 +02:00
..
2025-11-10 12:00:35 +00:00