Skip to content

adding hello world script #15

adding hello world script

adding hello world script #15

Workflow file for this run

name: PR Comment with GPT-4
on:
pull_request:
types: [opened, synchronize]
jobs:
comment:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install openai
pip install PyGithub
- name: Get PR changes
id: pr_changes
run: |
CHANGED_FILES=$(jq -r '.pull_request.head.sha' "$GITHUB_EVENT_PATH")
echo "::set-output name=changed_files::$CHANGED_FILES"
- name: Run Python script
env:
GIT_TOKEN: ${{ secrets.GIT_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: |
python src/generate_comment.py ${{ github.event.pull_request.number }} ${{ steps.pr_changes.outputs.changed_files }}