Claro, aquí tienes el contenido mejorado para el archivo T-ID GPT Code Review Task for Azure PipelinesThis task integrates the T-ID GPT model from OpenAI to review Pull Requests and offer feedback as comments directly within the Pull Request. SetupEnsure necessary permissions for the build service and authorize access to the system token. OpenAI ModelsSelect the desired model: "gpt-4", "gpt-3.5-turbo", "gpt-3.5-turbo-16k" or "gpt-3.5-turbo-16k-0613". Default is "gpt-3.5-turbo". Task Documentation for
|
Property | Default Value | Available Values | Description | Example |
---|---|---|---|---|
api_key |
"" |
$(api_key_openai) |
API key of OpenAI or Azure OpenAI. | $(api_key_openai) |
model |
"gpt-4o" |
Various GPT models | OpenAI model to use for code review. | "gpt-4o" |
checkForBugs |
false |
true , false |
Check for bugs in the code. | true |
checkForPerformance |
false |
true , false |
Check for performance issues in the code. | true |
checkForBestPractices |
false |
true , false |
Check for best practices in the code. | true |
codeReviewFramework |
.NET |
Text | Framework used for code review. | .NET |
additionalPrompts |
"" |
Text | Additional prompts for code review. | "Please provide response in Spanish. Please note that the phrase ''No feedback.'' should remain in English." |
excludedPriorities |
"" |
Text | Comma-separated list of priority labels to exclude from the review. | "PRIORITY: LOW,PRIORITY: MEDIUM" |
excludedPaths |
"" |
Text (glob patterns) | Comma-separated list of file patterns to exclude from the review. Supports glob patterns such as **/Migrations , **/README.md , **/*.md . |
"**/Migrations,**.Infrastructure/Migrations,**/README.md,**/*.js" |
excludeIfReplies |
true |
true , false |
Exclude comments from deletion if they have replies. | true |
excludeIfLikes |
true |
true , false |
Exclude comments from deletion if they have likes. | true |
Example Usage in Pipeline
- job: CodeReview_GPT_OpenAI
displayName: "🦾 CodeReview by OpenAI"
condition: and(succeeded(), eq(${{parameters.AnalyzeOpenAI}}, true))
dependsOn: SonarCloud_Analyze
steps:
- checkout: self
persistCredentials: true
- task: T-IDGPTCodeReview@1
inputs:
api_key: '$(api_key_openai)'
model: 'gpt-4o'
checkForBugs: true
checkForPerformance: true
checkForBestPractices: true
additionalPrompts: 'Please provide response in Spanish. Please note that the phrase ''No feedback.'' should remain in English.'
excludedPaths: '**/Migrations,**.Infrastructure/Migrations,**/README.md,**/*.js'
excludeIfReplies: true
excludeIfLikes: true