job51-gitlab-cr-node-skill-prompt-optimize 1.5.2 → 1.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +3 -11
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -388,21 +388,13 @@ ${diffObject.diff}`;
|
|
|
388
388
|
|
|
389
389
|
if (Array.isArray(lineInfoArray) && lineInfoArray.length > 0) {
|
|
390
390
|
debugLog(`从 LINE_INFO 中解析出行号信息:${JSON.stringify(lineInfoArray)}`);
|
|
391
|
-
//
|
|
391
|
+
// 返回第一个问题的行号信息
|
|
392
392
|
const lineInfo = lineInfoArray[0];
|
|
393
|
-
//
|
|
394
|
-
|
|
393
|
+
// GitLab API 只需要 new_path 和 new_line
|
|
394
|
+
return {
|
|
395
395
|
new_path: lineInfo.new_path,
|
|
396
396
|
new_line: lineInfo.new_line
|
|
397
397
|
};
|
|
398
|
-
// 可选字段:如果存在 old_path 和 old_line 也加入
|
|
399
|
-
if (lineInfo.old_path) {
|
|
400
|
-
position.old_path = lineInfo.old_path;
|
|
401
|
-
}
|
|
402
|
-
if (lineInfo.old_line) {
|
|
403
|
-
position.old_line = lineInfo.old_line;
|
|
404
|
-
}
|
|
405
|
-
return position;
|
|
406
398
|
}
|
|
407
399
|
} catch (error) {
|
|
408
400
|
debugLog(`解析 LINE_INFO JSON 失败:${error.message}`);
|
package/package.json
CHANGED