# 构建转换后的记录
converted_record = {
"id": str(iss["id"]),
"rule": str(iss.get("rule", "")),
"severity": iss.get("severity", ""),
"component": (iss.get("component", "")),
"project_key": (iss.get("project_key","")),
"line": iss.get("line"),
"status": iss.get("status"),
"message":iss.get("message"),
"effort":iss.get("effort"),
"commit_author_email":iss.get("commit_author_email"),
"assignee":iss.get("assignee"),
"hash":iss.get("hash",""),
"tags":iss.get("tags"),
"type":r_type_mapping.get(iss.get("rule_type"), ""),
"scope":iss.get("scope"),
"start_line":location_data.get("start_line",0),
"end_line":location_data.get("end_line",0),
"start_offset":location_data.get("start_offset",0),
"end_offset":location_data.get("end_offset",0),
"created_date":iss.get("created_date"),
"update_date":iss.get("update_date"),
"_tool_id": iss.get("_tool_id", "sonarqube"),
"_task_id": settings.task_id,
}还是报错
最新发布