Commit def3710f authored by 黎博's avatar 黎博

fix

parent b8e118ce
package cn.qg.holmes.controller.gitlab; package cn.qg.holmes.controller.gitlab;
import cn.qg.holmes.common.JsonResult; import cn.qg.holmes.common.JsonResult;
import cn.qg.holmes.utils.GitlabService;
import cn.qg.holmes.utils.HttpClientUtils; import cn.qg.holmes.utils.HttpClientUtils;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
...@@ -18,9 +15,6 @@ import java.util.*; ...@@ -18,9 +15,6 @@ import java.util.*;
@RequestMapping("/gitlab") @RequestMapping("/gitlab")
public class GitlabController { public class GitlabController {
@Autowired
GitlabService gitlabService;
/** /**
* 获取项目名列表 * 获取项目名列表
* @return * @return
...@@ -65,7 +59,5 @@ public class GitlabController { ...@@ -65,7 +59,5 @@ public class GitlabController {
public JsonResult getBranchesByProject(String projectName) { public JsonResult getBranchesByProject(String projectName) {
String url = "https://qaapi.liangkebang.com/pipeline/getGitBranch?name=" + projectName; String url = "https://qaapi.liangkebang.com/pipeline/getGitBranch?name=" + projectName;
return JsonResult.buildSuccessResult(JSON.parseObject(HttpClientUtils.doGet(url), Map.class)); return JsonResult.buildSuccessResult(JSON.parseObject(HttpClientUtils.doGet(url), Map.class));
// List<String> branches = gitlabService.getBranchesByProjectName(projectName);
// return JsonResult.buildSuccessResult(branches);
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment