A task for Azure DevOps build pipelines to add GPT as PR reviewer
Installation can be done using Visual Studio MarketPlace.
Add the tasks to your build definition.
before use this task, make sure that the build service has permissions to contribute to pull requests in your repository :
Add a checkout section with persistCredentials set to true.
steps:
- checkout: self
persistCredentials: true
Enable the option "Allow scripts to access the OAuth token" in the "Agent job" properties :
If you choose to use the Azure Open AI service, you must fill in the endpoint and API key of Azure OpenAI. The format of the endpoint is as follows: https://{XXXXXXXX}.openai.azure.com/openai/deployments/{MODEL_NAME}/chat/completions?api-version={API_VERSION}
In case you don't use Azure Open AI Service, you can choose which model to use, the supported models are "gpt-4", "gpt-3.5-turbo" and "gpt-3.5-turbo-16k". if no model is selected the "gpt-3.5-turbo" is used.
Found and fixed a bug or improved on something? Contributions are welcome! Please target your pull request against the main
branch or report an issue on GitHub so someone else can try and implement or fix it.
To build and publish extension yourself.
- Build GPTPullRequestReview project
npm run build
- Bump version in vss-extension.json and task.json
- Run
npx tfx-cli extension create
- Upload extension to marketplace https://marketplace.visualstudio.com/manage/