Skip to content

Releases

v14

Choose a tag to compare

@wayneplural wayneplural released this 04 Nov 12:43
abcb6e3

What's Changed

  • update second opinion so it deletes older pr comments by @wayneplural in #11

Full Changelog: v13...v14

v13

Choose a tag to compare

@wayneplural wayneplural released this 16 Jul 09:47
691f914

Allow adding a limit on content length

v12

Choose a tag to compare

@wayneplural wayneplural released this 16 Jul 09:41
2a00a74

Add option length limit to prevent too many tokens being sent to model

v5

Choose a tag to compare

@wayneplural wayneplural released this 12 Jul 11:41

This release publishes the wayneplural/second-opinion@v5 action to Github Marketplace to make it publicly available.

The action can be used in a workflow to send the code differences in the PR to an OpenAI api or Azure OpenAI api and return the post the resulting comments as a PR comment.

Example Usage

Open AI

name: Second Opinion - AI Code Review
run-name: Second Opinion - Diagnosing code 🩺
on: 
  pull_request:
    types: [opened, synchronize]

jobs:
  second-opinion:
    permissions:
      pull-requests: write
      contents: read
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Code
        uses: actions/checkout@v4
        with:
          fetch-depth: 2

      - name: Generate A Second Opinion
        uses: wayneplural/second-opinion@v5
        with:
          openai-api-key: ${{ secrets.AZURE_OPENAI_API_KEY }}
          ai-model: "gpt-3.5-turbo"
      

Azure Open AI

name: Second Opinion - AI Code Review
run-name: Second Opinion - Diagnosing code 🩺
on: 
  pull_request:
    types: [opened, synchronize]

jobs:
  second-opinion:
    permissions:
      pull-requests: write
      contents: read
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Code
        uses: actions/checkout@v4
        with:
          fetch-depth: 2

      - name: Generate A Second Opinion
        uses: wayneplural/second-opinion@v5
        with:
          azure-openai-api-endpoint: "https://openaiplural.openai.azure.com/"
          azure-api-version: "2024-05-01-preview"
          openai-api-key: ${{ secrets.OPENAI_API_KEY }}
          ai-model: "second-opinion"