You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constinstructionJsonFormat=`- Always provide the response in following JSON format: [{"lineNumber": <line_number>, "reviewComment": "<review comment>"}]`;
85
+
functionisJSON(obj){
86
+
try{
87
+
JSON.parse(obj);
88
+
returntrue;
89
+
}catch(e){
90
+
returnfalse;
91
+
}
92
+
}
93
+
94
+
functiongenerateMessages(file,chunk,prDetails){
81
95
82
-
varcontentSystemMessage=`You are a senior software engineer and your task is to review pull requests for possible bugs or bad development practices. Follow the instructions below:
83
-
- You will provide suggestions only if there are issues or bugs in the code, otherwise return an empty array.
96
+
constinstructionJsonFormat=`You are a senior software engineer and your task is to review pull requests for possible bugs or bad development practices. Follow the instructions:
97
+
- Always provide the response in following JSON format: [{"lineNumber": <line_number>, "reviewComment": "<review comment>"}]
98
+
- You will provide suggestions only if there are issues or bugs in the code, otherwise return an empty array.`;
99
+
100
+
varcontentSystemMessage=`
84
101
- Do not give positive comments or compliments.
85
102
- Don't suggest removing empty line
86
103
- Never suggest adding newline at end of file.
@@ -94,10 +111,10 @@ function createMessages(file, chunk, prDetails) {
0 commit comments