Skip to content

Feature/draftprchatgpt #52

Feature/draftprchatgpt

Feature/draftprchatgpt #52

Workflow file for this run

name: ChatGPT
on:
pull_request:
types:
- opened
- synchronize
workflow_dispatch:
jobs:
review:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Check if Draft
id: check
run: echo "::set-output name=is_draft::${{ github.event.pull_request.draft }}"
- name: Run if Draft
if: steps.check.outputs.is_draft == 'true'
uses: cirolini/[email protected]
with:
openai_api_key: ${{ secrets.OPENAI_API_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
github_pr_id: ${{ github.event.number }}
openai_engine: "text-davinci-002" #optional
openai_temperature: 0.5 #optional
openai_max_tokens: 2048 #optional
mode: file # file or patch