Show inline images on GitLab #143
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Images in GitLab MR and issue bodies stay links, because the adapter has no
AssetReader. Parent: #137. Depends on #138.Acceptance criteria
🖼 altlink (design.md → Images).Plan
/uploads/<secret>/<file>relative to the project's web URL (or/-/project/<id>/uploads/<secret>/<file>). Web routes likely don't accept a token, soOpenAssetrewrites a same-origin upload URL toGET /api/v4/projects/:id/uploads/:secret/:filename(GitLab 17.4+, Guest and above) and streams it with the token, dropping it on any hop off the origin, as ADR 0017 does for GitHub. A URL that isn't an upload is fetched as-is. Older servers return 404 → the link stays.OpenAsset(ADR 0016), since GitLab's are relative to the project, not the host root.Context
internal/forge/github/assets.go, #87, ADR 0016. docs.gitlab.com → Project markdown uploads API.🤖 Planned through composer-lite (plan in the run; summary: an I/O-free asset resolver so GitLab's project-relative
/uploads/links resolve to the right project,OpenAssetthrough the uploads API, and a client-wide guard so the token never follows a redirect off the GitLab host). Starts once #139 merges.🤖 MR open: #149
🤖 merged: #149