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.
Files changed (2) hide show
  1. package/index.js +3 -11
  2. 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
- // 构建符合 GitLab API position 对象
394
- const position = {
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "job51-gitlab-cr-node-skill-prompt-optimize",
3
- "version": "1.5.2",
3
+ "version": "1.5.3",
4
4
  "description": "GitLab merge request code review tool with AI-powered analysis and project context support",
5
5
  "main": "index.js",
6
6
  "bin": {