this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

lsp/extvalidator: support https://github.com/ remotes

We previously only supported the transform of
"git@github.com:foo/bar.git" into "github:foo/bar". Here we add support
for transforming "https://github.com/foo/bar.git" into "github:foo/bar"

Signed-off-by: Matthew Sackman <matthew@cue.works>
Change-Id: Ia9819e11f73cd4b59a6e506964916a920c313087
Reviewed-on: https://cue.gerrithub.io/c/cue-lang/cue/+/1233926
Reviewed-by: Roger Peppe <rogpeppe@gmail.com>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>

+4
+4
internal/lsp/extvalidator/extvalidator.go
··· 236 236 if withoutGitHub, wasCut := strings.CutPrefix(url, "git@github.com:"); wasCut { 237 237 // transform "git@github.com:foo/bar.git" into "github:foo/bar" 238 238 url = "github:" + strings.TrimSuffix(withoutGitHub, ".git") 239 + } else if withoutGitHub, wasCut := strings.CutPrefix(url, "https://github.com/"); wasCut { 240 + // transform "https://github.com/foo/bar.git" into "github:foo/bar" 241 + url = "github:" + strings.TrimSuffix(withoutGitHub, ".git") 239 242 } 243 + 240 244 return url, nil 241 245 } 242 246