WIP add sourcegraph

This commit is contained in:
2026-02-03 19:14:07 -10:00
parent 65d93d819b
commit dfff777d04
19 changed files with 1367 additions and 3 deletions
+10
View File
@@ -87,6 +87,16 @@ func setCompareContext(ctx *context.Context, before, head *git.Commit, headOwner
setPathsCompareContext(ctx, before, head, headOwner, headName)
setImageCompareContext(ctx)
setCsvCompareContext(ctx)
// Sourcegraph code intelligence configuration
if setting.Sourcegraph.Enabled {
ctx.Data["SourcegraphEnabled"] = true
ctx.Data["SourcegraphConfig"] = map[string]any{
"enabled": true,
"repoFullName": headOwner + "/" + headName,
"commitID": head.ID.String(),
}
}
}
// SourceCommitURL creates a relative URL for a commit in the given repository