You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After re-reviewing the examples and the PR, I don’t think this package should necessarily concern itself with parsing the URLs into standalone components, but instead keep URLs as URLs, including its components/parts when extracting the filePath, etc.
Keeping URLs as URLs makes it easier for URL-in URL-out operations like GitHubFileURL, where you want to swap parts of the URL without having to go through encoding/decoding every time.
The only parts where encoded URLs are a problem is when we pass the parts to API calls. I think we can address each of those cases individually as they're reported. Strangely, nobody ever reported them, which makes me think we should not spend time on this at this point.
However, this issue as titled and described was about "incorrectly-encoded URLs" like the given example, not "all encoded URLs".
In the end, going back to the original issue, it seems that Refined GitHub itself generated such URL and as such it was never an issue.
Activity
fregante commentedon Apr 5, 2026
@SunsetTechuila since you worked on something related recently (refined-github/refined-github#9138) do you think we need any work done for this here?
SunsetTechuila commentedon Apr 5, 2026
That would make sense, but it's unlikely to fix anything since I don't think anything is actually broken
SunsetTechuila commentedon Apr 5, 2026
We (almost?) never use file path or branch name from
getRepo, and those are the only things that can be encodedSunsetTechuila commentedon Apr 5, 2026
I think we also should update
buildRepoUrlto encode each ofpathPartsSunsetTechuila commentedon Apr 5, 2026
Copilot helped me find one time when we do - in
isDefaultBranch:https://github.com/refined-github/refined-github/blob/251124e611220d1eb6016a86b35c70bad6d2c9c0/source/github-helpers/is-default-branch.ts#L25-L27
SunsetTechuila commentedon Apr 5, 2026
fregante commentedon Jul 11, 2026
After re-reviewing the examples and the PR, I don’t think this package should necessarily concern itself with parsing the URLs into standalone components, but instead keep URLs as URLs, including its components/parts when extracting the filePath, etc.
Keeping URLs as URLs makes it easier for URL-in URL-out operations like
GitHubFileURL, where you want to swap parts of the URL without having to go through encoding/decoding every time.The only parts where encoded URLs are a problem is when we pass the parts to API calls. I think we can address each of those cases individually as they're reported. Strangely, nobody ever reported them, which makes me think we should not spend time on this at this point.
However, this issue as titled and described was about "incorrectly-encoded URLs" like the given example, not "all encoded URLs".
In the end, going back to the original issue, it seems that Refined GitHub itself generated such URL and as such it was never an issue.
Anyway, thanks for looking into this.