Detect forge source from parsed remote host #662

Closed
opened 2026-05-09 00:46:38 +00:00 by barrettruth · 0 comments
Owner

Problem

Forge detection parses the remote host but then matches configured host aliases against the full remote URL:

  • host parsing: lua/forge/detect.lua:52
  • full-URL matching: lua/forge/detect.lua:124

With broad defaults like github, gitlab, and forgejo, a username or repo path containing another forge name can select the wrong backend.

Expected

Match source host patterns against the parsed remote host, not arbitrary substrings in the full remote URL. Preserve configured host override behavior for actual hosts.

Non-goals

Do not add support for new forge APIs or change the configured source shape.

Context

Found during release-preview readiness audit. Remote Forgejo CI cannot currently be awaited because the Spark runner is down; use local verification for the fix.

## Problem Forge detection parses the remote host but then matches configured host aliases against the full remote URL: - host parsing: `lua/forge/detect.lua:52` - full-URL matching: `lua/forge/detect.lua:124` With broad defaults like `github`, `gitlab`, and `forgejo`, a username or repo path containing another forge name can select the wrong backend. ## Expected Match source host patterns against the parsed remote host, not arbitrary substrings in the full remote URL. Preserve configured host override behavior for actual hosts. ## Non-goals Do not add support for new forge APIs or change the configured source shape. ## Context Found during release-preview readiness audit. Remote Forgejo CI cannot currently be awaited because the Spark runner is down; use local verification for the fix.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
barrettruth/forge.nvim#662
No description provided.