From 68ea0962001ee618c64f35fbe6f687480b9f83b4 Mon Sep 17 00:00:00 2001 From: lewis <747342561@qq.com> Date: Wed, 24 Mar 2021 17:31:01 +0800 Subject: [PATCH] add-code-link-info --- models/cloudbrain.go | 1 + routers/repo/cloudbrain.go | 1 + 2 files changed, 2 insertions(+) diff --git a/models/cloudbrain.go b/models/cloudbrain.go index b97428861..2e036b60c 100755 --- a/models/cloudbrain.go +++ b/models/cloudbrain.go @@ -166,6 +166,7 @@ type TaskInfo struct { TaskName string `json:"task_name"` CodeName string `json:"code_name"` BenchmarkCategory []string `json:"selected_category"` + CodeLink string `json:"code_link"` } func ConvertToTaskPod(input map[string]interface{}) (TaskPod, error) { diff --git a/routers/repo/cloudbrain.go b/routers/repo/cloudbrain.go index be8e5d14e..f2d6eea8b 100755 --- a/routers/repo/cloudbrain.go +++ b/routers/repo/cloudbrain.go @@ -369,6 +369,7 @@ func downloadRateCode(repo *models.Repository, taskName, gitPath, codePath, benc TaskName: taskName, CodeName: repo.Name, BenchmarkCategory: strings.Split(benchmarkCategory, ","), + CodeLink: strings.TrimSuffix(repo.CloneLink().HTTPS, ".git"), }) if err != nil { log.Error("json.Marshal failed", err.Error())