Files
Devv f48b69e421 fix(skills): preserve slashes when escaping git refs in GitHub URLs
url.PathEscape encodes '/' as %2F, which broke slash-bearing refs
end-to-end: api.github.com/repos/o/r/commits/release%2Fv2 and
raw.githubusercontent.com/o/r/release%2Fv2/... are not accepted by
GitHub. The previous slash-ref tests only happened to pass because
the httptest fixture rewrote hosts but matched paths verbatim.

Add escapeRefPath that splits the ref on '/', PathEscapes each
segment, and rejoins with '/'. Use it in githubRefExists (commits
API) and in the rawPrefix built by fetchFromGitHub. The contents API
already takes ref via QueryEscape, which is correct.

This also fixes the failing TestFetchFromGitHub_ResolvesSlashRefAgainstAPI
flagged by review on PR #2209.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-05-07 15:02:41 +08:00
..