Loading
Feature: expand permalinks to code blocks in issues
What does this MR do and why?
Capture permalinks to LOC and expand into a code block.
resolves issue: #22156 (closed)
Expected behavior:
- ignores links to other repos or hosts
- ignores links other than permalinks (missing SHA, etc).
- only expands urls when the issue is viewed. Does not expand while editing the issue. Open to discussion if other behavior is preferred.
- on private repos does not expand if user does not have
read_codepermission.
I leaned on Claude code heavily for this because I don't really know ruby (I'm a rust enjoyer). Happy to revise by hand after an initial review.
Screenshots or screen recordings
| Before | After |
|---|---|
![]() |
![]() |
How to set up and validate locally
Setup
-
In a GDK, enable the flag:
Feature.enable(:expand_blob_permalinks) -
Create a new issue, paste a permalink to a LOC from that repo.
Edited by Nolan King

