gitlab-ai-review 2.5.3 โ 2.5.4
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/cli.js +34 -0
- package/index.js +1 -1
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -67,6 +67,40 @@ async function main() {
|
|
|
67
67
|
if (change.renamed_file && change.old_path !== change.new_path) {
|
|
68
68
|
console.log(` ๐ ${change.old_path} โ ${change.new_path}`);
|
|
69
69
|
}
|
|
70
|
+
|
|
71
|
+
// ่พๅบๅ
ทไฝ็ diff ๅ
ๅฎน
|
|
72
|
+
if (diff) {
|
|
73
|
+
console.log(`\n ๐ Diff ๅ
ๅฎน:`);
|
|
74
|
+
console.log(' โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ');
|
|
75
|
+
|
|
76
|
+
// ๅ่กๆพ็คบ diff๏ผๅนถๆทปๅ ้ข่ฒๆ ่ฎฐ
|
|
77
|
+
const diffLines = diff.split('\n');
|
|
78
|
+
diffLines.forEach((line, lineIndex) => {
|
|
79
|
+
// ้ๅถๆพ็คบๆๅค 100 ่ก diff
|
|
80
|
+
if (lineIndex >= 100) {
|
|
81
|
+
if (lineIndex === 100) {
|
|
82
|
+
console.log(' โ ... (diff ๅ
ๅฎน่ฟ้ฟ๏ผๅทฒๆชๆญ)');
|
|
83
|
+
}
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// ไธบไธๅ็ฑปๅ็่กๆทปๅ ๆ ่ฎฐ
|
|
88
|
+
let prefix = ' โ ';
|
|
89
|
+
if (line.startsWith('+++') || line.startsWith('---')) {
|
|
90
|
+
prefix = ' โ ๐ '; // ๆไปถ่ทฏๅพ
|
|
91
|
+
} else if (line.startsWith('@@')) {
|
|
92
|
+
prefix = ' โ ๐ต '; // hunk ๆ ่ฎฐ
|
|
93
|
+
} else if (line.startsWith('+') && !line.startsWith('+++')) {
|
|
94
|
+
prefix = ' โ โ '; // ๆฐๅข่ก
|
|
95
|
+
} else if (line.startsWith('-') && !line.startsWith('---')) {
|
|
96
|
+
prefix = ' โ โ '; // ๅ ้ค่ก
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
console.log(prefix + line);
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
console.log(' โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ\n');
|
|
103
|
+
}
|
|
70
104
|
});
|
|
71
105
|
|
|
72
106
|
console.log('โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ\n');
|
package/index.js
CHANGED
|
@@ -15,7 +15,7 @@ import * as DiffParser from './lib/diff-parser.js';
|
|
|
15
15
|
export class GitLabAIReview {
|
|
16
16
|
constructor(options = {}) {
|
|
17
17
|
this.name = 'GitLab AI Review SDK';
|
|
18
|
-
this.version = '2.5.
|
|
18
|
+
this.version = '2.5.4';
|
|
19
19
|
|
|
20
20
|
// ๅฆๆไผ ๅ
ฅไบ้
็ฝฎ๏ผไฝฟ็จๆๅจ้
็ฝฎ๏ผๅฆๅไฝฟ็จ่ชๅจๆฃๆต
|
|
21
21
|
if (options.token || options.gitlab) {
|