From d7ee8d337801f735447bf2ab9e81cb31b4dbee15 Mon Sep 17 00:00:00 2001 From: Engel Nyst Date: Sun, 24 Nov 2024 13:44:29 +0100 Subject: [PATCH] remove the old pr review --- .github/workflows/eval-runner.yml | 2 - .github/workflows/review-pr.yml | 81 ------------------------------- 2 files changed, 83 deletions(-) delete mode 100644 .github/workflows/review-pr.yml diff --git a/.github/workflows/eval-runner.yml b/.github/workflows/eval-runner.yml index f788cf78d2f8..6f1c225efee6 100644 --- a/.github/workflows/eval-runner.yml +++ b/.github/workflows/eval-runner.yml @@ -3,8 +3,6 @@ name: Run Evaluation on: pull_request: types: [labeled] - schedule: - - cron: "0 1 * * *" # Run daily at 1 AM UTC workflow_dispatch: inputs: reason: diff --git a/.github/workflows/review-pr.yml b/.github/workflows/review-pr.yml deleted file mode 100644 index bc3d103e6413..000000000000 --- a/.github/workflows/review-pr.yml +++ /dev/null @@ -1,81 +0,0 @@ -# Workflow that uses OpenHands to review a pull request. PR must be labeled 'review-this' -name: Use OpenHands to Review Pull Request - -on: - pull_request: - types: [synchronize, labeled] - -permissions: - contents: write - pull-requests: write - -jobs: - dogfood: - if: contains(github.event.pull_request.labels.*.name, 'review-this') - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v3 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.12' - - name: install git, github cli - run: | - sudo apt-get install -y git gh - git config --global --add safe.directory $PWD - - name: Checkout Repository - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.base.ref }} # check out the target branch - - name: Download Diff - run: | - curl -O "${{ github.event.pull_request.diff_url }}" -L - - name: Write Task File - run: | - echo "Your coworker wants to apply a pull request to this project." > task.txt - echo "Read and review ${{ github.event.pull_request.number }}.diff file. Create a review-${{ github.event.pull_request.number }}.txt and write your concise comments and suggestions there." >> task.txt - echo "Do not ask me for confirmation at any point." >> task.txt - echo "" >> task.txt - echo "Title" >> task.txt - echo "${{ github.event.pull_request.title }}" >> task.txt - echo "" >> task.txt - echo "Description" >> task.txt - echo "${{ github.event.pull_request.body }}" >> task.txt - echo "" >> task.txt - echo "Diff file is: ${{ github.event.pull_request.number }}.diff" >> task.txt - - name: Set up environment - run: | - curl -sSL https://install.python-poetry.org | python3 - - export PATH="/github/home/.local/bin:$PATH" - poetry install --without evaluation,llama-index - poetry run playwright install --with-deps chromium - - name: Run OpenHands - env: - LLM_API_KEY: ${{ secrets.LLM_API_KEY }} - LLM_MODEL: ${{ vars.LLM_MODEL }} - run: | - # Append path to launch poetry - export PATH="/github/home/.local/bin:$PATH" - # Append path to correctly import package, note: must set pwd at first - export PYTHONPATH=$(pwd):$PYTHONPATH - export WORKSPACE_MOUNT_PATH=$GITHUB_WORKSPACE - export WORKSPACE_BASE=$GITHUB_WORKSPACE - echo -e "/exit\n" | poetry run python openhands/core/main.py -i 50 -f task.txt - rm task.txt - - name: Check if review file is non-empty - id: check_file - run: | - ls -la - if [[ -s review-${{ github.event.pull_request.number }}.txt ]]; then - echo "non_empty=true" >> $GITHUB_OUTPUT - fi - shell: bash - - name: Create PR review if file is non-empty - env: - GH_TOKEN: ${{ github.token }} - if: steps.check_file.outputs.non_empty == 'true' - run: | - gh pr review ${{ github.event.pull_request.number }} --comment --body-file "review-${{ github.event.pull_request.number }}.txt"