mirror of
				https://github.com/freeedcom/ai-codereviewer.git
				synced 2025-10-31 06:00:53 +00:00 
			
		
		
		
	CICO-111286: Add more logs to debug the dup comment issue
This commit is contained in:
		
					parent
					
						
							
								33810674fc
							
						
					
				
			
			
				commit
				
					
						fa4ac19d74
					
				
			
		
					 3 changed files with 9 additions and 1 deletions
				
			
		
							
								
								
									
										3
									
								
								dist/index.js
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								dist/index.js
									
										
									
									
										vendored
									
									
								
							|  | @ -105,6 +105,8 @@ function getExistingComments(owner, repo, pull_number) { | |||
| function analyzeCode(parsedDiff, prDetails, existingComments) { | ||||
|     return __awaiter(this, void 0, void 0, function* () { | ||||
|         const comments = []; | ||||
|         // Log the parsed diff for debugging
 | ||||
|         console.log("Parsed Diff:", JSON.stringify(parsedDiff, null, 2)); | ||||
|         for (const file of parsedDiff) { | ||||
|             if (file.to === "/dev/null") | ||||
|                 continue; // Ignore deleted files
 | ||||
|  | @ -526,6 +528,7 @@ function main() { | |||
|             return; | ||||
|         } | ||||
|         const parsedDiff = (0, parse_diff_1.default)(diff); | ||||
|         console.log("Parsed Diff:", JSON.stringify(parsedDiff, null, 2)); // Log parsed diff for debugging
 | ||||
|         const excludePatterns = core | ||||
|             .getInput("exclude") | ||||
|             .split(",") | ||||
|  |  | |||
							
								
								
									
										2
									
								
								dist/index.js.map
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/index.js.map
									
										
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							|  | @ -83,6 +83,9 @@ async function analyzeCode( | |||
| ): Promise<Array<{ body: string; path: string; line: number }>> { | ||||
|   const comments: Array<{ body: string; path: string; line: number }> = []; | ||||
| 
 | ||||
|   // Log the parsed diff for debugging
 | ||||
|   console.log("Parsed Diff:", JSON.stringify(parsedDiff, null, 2)); | ||||
| 
 | ||||
|   for (const file of parsedDiff) { | ||||
|     if (file.to === "/dev/null") continue; // Ignore deleted files
 | ||||
|     for (const chunk of file.chunks) { | ||||
|  | @ -542,6 +545,8 @@ async function main() { | |||
| 
 | ||||
|   const parsedDiff = parseDiff(diff); | ||||
| 
 | ||||
|   console.log("Parsed Diff:", JSON.stringify(parsedDiff, null, 2)); // Log parsed diff for debugging
 | ||||
| 
 | ||||
|   const excludePatterns = core | ||||
|       .getInput("exclude") | ||||
|       .split(",") | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue