Test Github Workflows #11
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Test Code Review" | |
on: | |
pull_request: | |
types: [edited] | |
paths-ignore: | |
- "*.md" | |
- "LICENSE" | |
jobs: | |
review: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- 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" |