about summary refs log tree commit diff stats
path: root/internal/importer
diff options
context:
space:
mode:
authorAlan Pearce2024-05-12 21:28:26 +0200
committerAlan Pearce2024-05-12 21:34:57 +0200
commitdf77930bef039e4aef024574c60fb64d75287eee (patch)
treec64d32b72a69931c191e1d7878480638b9a4c829 /internal/importer
parentfb25a97b6c55c6d51e59d983fdb74b4917c97bf0 (diff)
downloadsearchix-df77930bef039e4aef024574c60fb64d75287eee.tar.lz
searchix-df77930bef039e4aef024574c60fb64d75287eee.tar.zst
searchix-df77930bef039e4aef024574c60fb64d75287eee.zip
fix: linking to wrong declaration URLs
Diffstat (limited to 'internal/importer')
-rw-r--r--internal/importer/ingest.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/importer/ingest.go b/internal/importer/ingest.go
index 08d0366..7706807 100644
--- a/internal/importer/ingest.go
+++ b/internal/importer/ingest.go
@@ -57,6 +57,9 @@ func ValueTypeToString(valueType jstream.ValueType) string {
 }
 
 func makeGitHubFileURL(userRepo string, ref string, subPath string) string {
+	if ref == "" {
+		ref = "master"
+	}
 	url, _ := url.JoinPath("https://github.com/", userRepo, "blob", ref, subPath)
 
 	return url