Skip to content

Latest commit

 

History

History
110 lines (81 loc) · 4.4 KB

README.md

File metadata and controls

110 lines (81 loc) · 4.4 KB

🌟 GO1 OpenAI Review GO1Logo

This repository is the home of the 'openai-review' project, a tool designed to streamline the process of reviewing and providing insightful feedback on Pull Requests. By leveraging the power of OpenAI, it aims to enhance collaboration and code quality in our Go1 Engineering teams with the possibility to open source in the future.

🙏 OpenAI Review is in its exciting early stages of development. We warmly invite you to contribute and join us on this journey to shape the tool's future, enhancing its usability and making it even better. Your ideas and contributions can make a real difference! 🙏



📚 Table of Contents

  1. Current capabilities of OpenAI Review
  2. Project Owner
  3. Getting Started



🎉 Current capabilities of OpenAI Review

OpenAI Review is a tool designed to streamline your development workflow. Here's what it can do for you:

  • Automatically assign an assignee to a Pull Request.

  • Assign reviewers to a Pull Request.

  • Generate concise and informative descriptions.

  • Provide an overall review of each changed file in your Pull Request.



🧑‍🚒 Project Owner

We are working on finding the right owner for this project. Meanwhile, code reviews can be sent to the AAA team



🍀 Getting Started

🧐 Project issues and brainstorming


🤝 How to make code changes to this project

To make code changes to this project, follow these steps:

  1. Clone the repository: git clone git@github.com:go1com/openai-review.git
  2. Navigate to the project directory: cd openai-review
  3. Install the dependencies: npm install
  4. Checkout to your new branch and start making changes
  5. Test your changes - Details instruction in How to test your OpenAI Review changes in your project
  6. Run npm run pack
  7. Push, commit and request review

🧪 How to test your OpenAI Review changes in your project

To use OpenAI Review in your project, follow these steps:

  1. Request for Azure OpenAI key and endpoint access.
  2. Create environment secret/variable for the Azure OpenAI key and endpoint in your project. In the following sample code, we usesecrets.AZURE_OPENAI_API_KEY andvars.AZURE_OPENAI_ENDPOINT .
  3. From .github/workflows in your project repository, create a new file for the code review job. Here is the sample code:
name: "PR Review"
on:
  pull_request:
    types: [opened, synchronize, reopened, edited]
defaults:
  run:
    working-directory: ./
jobs:
  openai_review:
    name: "Azure OpenAI Review"
    runs-on: ubuntu-latest
    permissions:
      contents: read
      pull-requests: write
    env:
      AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }}
      AZURE_OPENAI_ENDPOINT: ${{ vars.AZURE_OPENAI_ENDPOINT }}
    steps:
    - name: Azure OpenAI
      uses: go1com/openai-review  #Use go1com/openai-review@[your-branch-name] OR go1com/openai-review@[deployment-tag]
      if: github.event_name == 'pull_request'
      id: openai
      with:
        azure-openai-api-key: ${{ env.AZURE_OPENAI_API_KEY }}
        azure-openai-endpoint: ${{ env.AZURE_OPENAI_ENDPOINT }}
        bot-comment: true
    - name: Print
      run: |
        echo  "${{ steps.openai.outputs.text}}"

You can follow along with this tutorial as well https://www.loom.com/share/7dfceb0d1ea747ebbe610202c5ee9ed7

  1. When you create a new Pull Request, you will see a PR Review job running in your branch

PR Review Screenshot