Skip to content

Test Github Workflows #15

Test Github Workflows

Test Github Workflows #15

Workflow file for this run

name: "Test Code Review"
on:
pull_request:
types: [synchronize]
paths-ignore:
- "*.md"
- "LICENSE"
- "*.json"
jobs:
review:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: "Get diff of the pull request"
id: get_diff
shell: bash
env:
PULL_REQUEST_HEAD_REF: "${{ github.event.pull_request.head.ref }}"
run: |-
git fetch origin "${{ env.PULL_REQUEST_HEAD_REF }}:${{ env.PULL_REQUEST_HEAD_REF }}"
git checkout "${{ env.PULL_REQUEST_HEAD_REF }}"
git diff "origin/${{ env.PULL_REQUEST_HEAD_REF }}" > "diff.txt"
# shellcheck disable=SC2086
echo "diff=$(cat "diff.txt")" >> $GITHUB_ENV
- uses: yu-iskw/[email protected]
name: "Code Review by GPT"
id: review
with:
openai_api_key: ${{ secrets.OPENAI_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
github_repository: ${{ github.repository }}
github_pull_request_number: ${{ github.event.pull_request.number }}
git_commit_hash: ${{ github.event.pull_request.head.sha }}
model: "gpt-3.5-turbo"
temperature: "0.1"
max_tokens: "512"
top_p: "1"
frequency_penalty: "0.0"
presence_penalty: "0.0"
pull_request_diff: |-
${{ steps.get_diff.outputs.pull_request_diff }}
pull_request_chunk_size: "3500"
extra_prompt: |-
You are very familiar with typescript, rxjs, ngrx, jest and angular.
log_level: "DEBUG"