Azure / PSRule.Rules.Azure

Rules to validate Azure resources and infrastructure as code (IaC) using PSRule.
https://azure.github.io/PSRule.Rules.Azure/
MIT License
389 stars 84 forks source link

Add GPT based code review CI #2242

Open BenjaminEngeset opened 1 year ago

BenjaminEngeset commented 1 year ago

Are we open for adding a GPT based code review CI?

It's breaking and cutting edge, but it would have been interesting to have this on our PRs and see what kind of suggestions would be emitted and if they are of any value in the cycle. There is already a Microsoft repository that have taken it in use.

https://github.com/microsoft/gpt-review

Example workflow:

name: GPT Review on Pull Request

on:
  pull_request_target:
    branches: [main]

jobs:
  add_pr_comment:
    runs-on: ubuntu-latest
    name: OpenAI PR Comment
    steps:
      - id: review
        uses: microsoft/gpt-review@v0.9.0
        with:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          AZURE_OPENAI_API: ${{ secrets.AZURE_OPENAI_API }}
          AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }}

Example suggestions provided:

https://github.com/microsoft/SynapseML/pulls

BernieWhite commented 1 year ago

@BenjaminEngeset We don't have access to an Azure Open AI instance on this repo. We can leave this issue open for a time however I don't think we will be able to progress this anytime soon.

BenjaminEngeset commented 1 year ago

@BenjaminEngeset We don't have access to an Azure Open AI instance on this repo. We can leave this issue open for a time however I don't think we will be able to progress this anytime soon.

@BernieWhite Great, thanks!