Update ai-code-review.yaml #6
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
jobs: | |
ai-code-review: | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write # Allow write access to PRs | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Set up environment variables | |
run: | | |
echo "GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV | |
echo "GITHUB_REPO=${{ github.repository }}" >> $GITHUB_ENV | |
echo "PR_NUMBER=${{ github.event.pull_request.number }}" >> $GITHUB_ENV | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y jq | |
- name: Grant execute permission to the script | |
run: chmod +x ./scripts/run_code_reviewer.sh | |
- name: Run AI Code Reviewer | |
run: ./scripts/run_code_reviewer.sh | |
env: | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_REPO: ${{ github.repository }} | |
PR_NUMBER: ${{ github.event.pull_request.number }} |