OpenAI-Code-Review

Open AI Code Review DevOps Extension

Supercharge Your Code Reviews with Open AI

Welcome to the Open AI Code Review DevOps Extension – your new ally in building top-notch software! This extension seamlessly integrates Open AI’s powerful language models into your Azure DevOps pipeline, transforming code reviews into an intelligent and efficient process.

Get Started Now!

Enhance your development workflow with Open AI Code Review. Start receiving intelligent and actionable insights on your code changes. Install the extension today and experience the future of code reviews!

Why Choose Open AI Code Review?

Prerequisites

Getting started

  1. Install the Open AI Code Review DevOps Extension from the Azure DevOps Marketplace.
  2. Add Open AI Code Review Task to Your Pipeline:

    ```yaml trigger: branches: exclude: - ‘*’

    pr: branches: include: - ‘*’

    jobs:

    • job: CodeReview pool: vmImage: ‘ubuntu-latest’ steps:
      • task: OpenAICodeReviewTask@1 inputs: api_key: $(OpenAI_ApiKey) ai_model: ‘gpt-3.5-turbo’ bugs: true performance: true best_practices: true file_extensions: ‘js,ts,css,html’ file_excludes: ‘file1.js,file2.py,secret.txt’ additional_prompts: ‘Fix variable naming, Ensure consistent indentation, Review error handling approach’`
  3. If you do not already have Build Validation configured for your branch already add Build validation to your branch policy to trigger the code review when a Pull Request is created

FAQ

Q: What agent job settings are required?

A: Ensure that “Allow scripts to access OAuth token” is enabled as part of the agent job. Follow the documentation for more details.

Q: What permissions are required for Build Administrators?

A: Build Administrators must be given “Contribute to pull requests” access. Check this Stack Overflow answer for guidance on setting up permissions.

Bug Reports

If you find a bug or unexpected behavior, please open a bug report.

Feature Requests

If you have ideas for new features or enhancements, please submit a feature request.

License

This project is licensed under the MIT License.

If you would like to contribute to the development of this extension, please follow our contribution guidelines.