MCPcopy Index your code
hub / github.com/Tencent/CodeAnalysis / init_job

Method init_job

client/util/api/dogapi.py:102–113  ·  view source on GitHub ↗

向server初始化一个任务 :return: { "job": job_id, "scan_id": scan_id, "tasks": {"pylint": task_id1, "cppcheck": task_id2} }

(self, repo_id, proj_id, init_data, org_sid, team_name)

Source from the content-addressed store, hash-verified

100 return self.get_data_from_result(rsp)
101
102 def init_job(self, repo_id, proj_id, init_data, org_sid, team_name):
103 """
104 向server初始化一个任务
105 :return: {
106 "job": job_id,
107 "scan_id": scan_id,
108 "tasks": {"pylint": task_id1, "cppcheck": task_id2}
109 }
110 """
111 rel_url = f"api/orgs/{org_sid}/teams/{team_name}/repos/{repo_id}/projects/{proj_id}/jobs/init/"
112 rsp = CodeDogHttpClient(self._server_url, rel_url, headers=self._headers, json_data=init_data).post()
113 return self.get_data_from_result(rsp)
114
115 def send_proj_result(self, repo_id, proj_id, job_id, scan_result, org_sid, team_name):
116 """

Callers

nothing calls this directly

Calls 3

get_data_from_resultMethod · 0.95
CodeDogHttpClientClass · 0.85
postMethod · 0.45

Tested by

no test coverage detected