From 42f646aa79d6f4f3913e0e3222cad641c9cfad0d Mon Sep 17 00:00:00 2001 From: Taras Madan Date: Fri, 4 Oct 2024 13:49:44 +0200 Subject: dashboard/app: make WebGitURIProvider configurable We don't want to scale the github repo usage. Let's eventually switch to the internal service. --- pkg/covermerger/provider_web.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkg') diff --git a/pkg/covermerger/provider_web.go b/pkg/covermerger/provider_web.go index 2a1bee85a..43bfee7e0 100644 --- a/pkg/covermerger/provider_web.go +++ b/pkg/covermerger/provider_web.go @@ -11,7 +11,7 @@ import ( "net/url" ) -type FuncProxyURI func(filePath string, rc RepoCommit) string +type FuncProxyURI func(filePath, commit string) string type webGit struct { funcProxy FuncProxyURI @@ -39,7 +39,7 @@ var errFileNotFound = errors.New("file not found") func (mr *webGit) loadFile(filePath, repo, commit string) ([]byte, error) { var uri string if mr.funcProxy != nil { - uri = mr.funcProxy(filePath, RepoCommit{Repo: repo, Commit: commit}) + uri = mr.funcProxy(filePath, commit) } else { uri = fmt.Sprintf("%s/plain/%s", repo, filePath) if commit != "latest" { -- cgit mrf-deployment