mirror of
				https://github.com/freeedcom/ai-codereviewer.git
				synced 2025-11-03 23:50:54 +00:00 
			
		
		
		
	improve the prompt per reviews suggestion
This commit is contained in:
		
					parent
					
						
							
								6176ca5693
							
						
					
				
			
			
				commit
				
					
						a2b67879fe
					
				
			
		
					 3 changed files with 3 additions and 3 deletions
				
			
		
							
								
								
									
										2
									
								
								dist/index.js
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/index.js
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -119,7 +119,7 @@ function getBaseAndHeadShas(owner, repo, pull_number) {
 | 
			
		|||
    });
 | 
			
		||||
}
 | 
			
		||||
function createPrompt(file, chunk, prDetails) {
 | 
			
		||||
    return `Your job is to review pull requests. Instructions:
 | 
			
		||||
    return `Your task is to review pull requests. Instructions:
 | 
			
		||||
- Provide the response in following JSON format:  [{"lineNumber":  <line_number>, "reviewComment": "<review comment>"}]
 | 
			
		||||
- Do not give positive comments or compliments.
 | 
			
		||||
- Provide comments and suggestions ONLY if there is something to improve, otherwise return an empty array.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										2
									
								
								dist/index.js.map
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/index.js.map
									
										
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| 
						 | 
				
			
			@ -96,7 +96,7 @@ async function getBaseAndHeadShas(
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
function createPrompt(file: File, chunk: Chunk, prDetails: PRDetails): string {
 | 
			
		||||
  return `Your job is to review pull requests. Instructions:
 | 
			
		||||
  return `Your task is to review pull requests. Instructions:
 | 
			
		||||
- Provide the response in following JSON format:  [{"lineNumber":  <line_number>, "reviewComment": "<review comment>"}]
 | 
			
		||||
- Do not give positive comments or compliments.
 | 
			
		||||
- Provide comments and suggestions ONLY if there is something to improve, otherwise return an empty array.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue