cessda / cessda.cvs.two

Apache License 2.0
0 stars 2 forks source link

Trial the use of ChatGPT to review code modifications #722

Open john-shepherdson opened 11 months ago

john-shepherdson commented 11 months ago

ChatGPT can be used to comment on the content of Pull Request.

The purpose of this trial is to: determine if the ChatFPT comments add any value to the code review process; assess the likely cost of using the ChatGPT API for this purpose, once the free trial period expires.

Steps to configure ChatGPT code reviews:

john-shepherdson commented 11 months ago

Repo Action permission 1

Repo Action permission 2

john-shepherdson commented 11 months ago
on:
  pull_request:
    types: [opened, synchronize]

jobs:
  hello_world_job:
    runs-on: ubuntu-latest
    name: ChatGPT explain code
    steps:
      - name: ChatGTP explain code
        uses: cirolini/chatgpt-github-actions@v1.3
        with:
          openai_api_key: ${{ secrets.OPEN_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: files # files or patch