From ce7ca56d0cf9d696d890aaac09b7152c95464a16 Mon Sep 17 00:00:00 2001 From: Denis Efremov Date: Thu, 9 Jun 2022 11:42:32 +0400 Subject: pkg/vcs: show proper link to LVC syzkaller Signed-off-by: Denis Efremov --- pkg/vcs/vcs.go | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'pkg') diff --git a/pkg/vcs/vcs.go b/pkg/vcs/vcs.go index 42a344e56..f94272fe5 100644 --- a/pkg/vcs/vcs.go +++ b/pkg/vcs/vcs.go @@ -360,7 +360,7 @@ var commitPrefixes = []string{ "net-backports:", } -const SyzkallerRepo = "https://github.com/google/syzkaller" +const SyzkallerRepo = "https://lvc-gitlab.intra.ispras.ru/lvc/syzkaller" const HEAD = "HEAD" @@ -396,6 +396,17 @@ func link(url, hash, file string, line, typ int) string { if strings.HasPrefix(url, "https://github.com/") { return linkGithub(url, hash, file, line, typ) } + if strings.HasPrefix(url, "https://lvc-gitlab.intra.ispras.ru/") { + url = strings.TrimSuffix(url, ".git") + switch typ { + case 1: + return url + "/-/tree/" + hash + case 2: + return url + "/-/commits/" + hash + default: + return url + "/-/commit/" + hash + } + } if strings.HasPrefix(url, "https://git.kernel.org/pub/scm/") || strings.HasPrefix(url, "git://git.kernel.org/pub/scm/") { return linkKernelOrg(url, hash, file, line, typ) -- cgit mrf-deployment