fix(release): make Renovate's apm manager resolve per-plugin tags on this Gitea #235

Open
opened 2026-11-27 21:19:29 +00:00 by Claude · 1 comment
Owner

Problem

Renovate's apm manager can't look up <plugin>-v<version> tags for a plugin pinned from this Gitea.

In Renovate's lib/modules/manager/apm/extract.ts, resolveRepoPath trims the path to owner/repo only for GitHub. On any other host it cuts the path only at a prompts/instructions/collections segment or at a *.prompt|instructions|chatmode|agent.md file. So <host>/Mortis/Holocron/plugins/git becomes packageName https://<host>/Mortis/Holocron/plugins/git, and the git-tags datasource runs git ls-remote on that URL, which fails. This is inferred from the source and has not been run.

Tag-prefix scoping works since Renovate 44.153.0 (renovatebot/renovate#46737). The only broken step is the repo URL.

Proposal

  1. Document this consumer-side packageRule as the workaround. It is untested:
    {
      "matchManagers": ["apm"],
      "matchDatasources": ["git-tags"],
      "matchPackageNames": ["/\\/plugins\\/[^/]+$/"],
      "overridePackageName": "{{{replace '/plugins/[^/]+$' '' packageName}}}"
    }
    
  2. Check it against a real Renovate run (>= 44.153.0) on a consumer that pins a Holocron plugin.
  3. Open an upstream Renovate PR that adds plugins, or apm's primitive directories, to the segments resolveRepoPath strips on non-GitHub hosts.
  4. apm 0.28.0 rejects the shorthand dependency form (see the sibling issue on the shorthand form), so consumers use the object form (git: / path: / ref:). Check which dependency forms Renovate's apm manager parses, and whether it extracts the object form differently. The workaround rule may need to match a different packageName shape.

Acceptance criteria

  • A real Renovate run on a consumer pinned to an older <plugin>-v<version> proposes the newer tag, and the run's Renovate version is recorded.
  • We know which dependency forms (shorthand string, object form) Renovate's apm manager extracts, and the workaround covers the form consumers actually use.
  • The verified packageRule is documented for consumers. ADR-0033's "untested" note is updated or replaced.
  • An upstream Renovate issue or PR is filed and linked here.

Notes

  • Follow-up from #223 / PR #234; tag form in ADR-0033 (docs/adr/0033-plugin-releases-are-tagged-plugin-v-version.md).

Assisted-by: Claude Code

## Problem Renovate's `apm` manager can't look up `<plugin>-v<version>` tags for a plugin pinned from this Gitea. In Renovate's `lib/modules/manager/apm/extract.ts`, `resolveRepoPath` trims the path to `owner/repo` only for GitHub. On any other host it cuts the path only at a `prompts`/`instructions`/`collections` segment or at a `*.prompt|instructions|chatmode|agent.md` file. So `<host>/Mortis/Holocron/plugins/git` becomes packageName `https://<host>/Mortis/Holocron/plugins/git`, and the `git-tags` datasource runs `git ls-remote` on that URL, which fails. This is inferred from the source and has not been run. Tag-prefix scoping works since Renovate 44.153.0 (renovatebot/renovate#46737). The only broken step is the repo URL. ## Proposal 1. Document this consumer-side packageRule as the workaround. It is untested: ```json { "matchManagers": ["apm"], "matchDatasources": ["git-tags"], "matchPackageNames": ["/\\/plugins\\/[^/]+$/"], "overridePackageName": "{{{replace '/plugins/[^/]+$' '' packageName}}}" } ``` 2. Check it against a real Renovate run (>= 44.153.0) on a consumer that pins a Holocron plugin. 3. Open an upstream Renovate PR that adds `plugins`, or apm's primitive directories, to the segments `resolveRepoPath` strips on non-GitHub hosts. 4. apm 0.28.0 rejects the shorthand dependency form (see the sibling issue on the shorthand form), so consumers use the object form (`git:` / `path:` / `ref:`). Check which dependency forms Renovate's apm manager parses, and whether it extracts the object form differently. The workaround rule may need to match a different packageName shape. ## Acceptance criteria - [ ] A real Renovate run on a consumer pinned to an older `<plugin>-v<version>` proposes the newer tag, and the run's Renovate version is recorded. - [ ] We know which dependency forms (shorthand string, object form) Renovate's apm manager extracts, and the workaround covers the form consumers actually use. - [ ] The verified packageRule is documented for consumers. ADR-0033's "untested" note is updated or replaced. - [ ] An upstream Renovate issue or PR is filed and linked here. ## Notes - Follow-up from #223 / PR #234; tag form in ADR-0033 (`docs/adr/0033-plugin-releases-are-tagged-plugin-v-version.md`). Assisted-by: Claude Code
Claude added the Kind/Enhancement
Priority
Medium
3
Status/Needs Triage
labels 2026-11-27 21:19:29 +00:00
Author
Owner

The "sibling issue on the shorthand form" is #236.

The "sibling issue on the shorthand form" is #236.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mortis/Holocron#235