Repository navigation
Releases
Releases · wayneplural/second-opinion
v14
What's Changed
- update second opinion so it deletes older pr comments by @wayneplural in #11
Full Changelog: v13...v14
v13
Allow adding a limit on content length
v12
Add option length limit to prevent too many tokens being sent to model
v5
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"