Skip to content

Commit

Permalink
Merge pull request #272 from mattzcarey/feat/github-marketplace-action
Browse files Browse the repository at this point in the history
feat: first attempt at custom github action plus test workflow
  • Loading branch information
SEBRATHEZEBRA authored Sep 13, 2023
2 parents 0309c70 + d577305 commit 711f25c
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: 'Code Review GPT'
description: 'Reviews the staged files with a GPT model from OpenAI'
author: 'Orion Tools'
inputs:
MODEL:
description: 'The GPT model to use'
required: true
default: 'gpt-3.5-turbo'
OPENAI_API_KEY:
description: 'OpenAI API Key'
required: true
GITHUB_TOKEN:
description: 'Github token'
required: true
runs:
using: 'composite'
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
node-version: 18

- name: Install Code Review GPT
shell: bash
run: npm install code-review-gpt

- name: Run Code Review GPT
shell: bash
run: npx code-review-gpt review --ci=github --model=$MODEL

env:
MODEL: ${{ inputs.MODEL }}
OPENAI_API_KEY: ${{ inputs.OPENAI_API_KEY }}
BASE_SHA: ${{ github.event.pull_request.base.sha }}
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}

0 comments on commit 711f25c

Please sign in to comment.