feat: add generalized cli_args input to action, move CLI docs to CLI.… #6
This file contains hidden or 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: Review Pull Request | |
| on: | |
| pull_request: | |
| branches: [ main ] | |
| paths: | |
| - 'action.yml' | |
| jobs: | |
| review-pr: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 # Fetch all history for diff | |
| - name: Generate PR Diff | |
| run: git diff ${{ github.event.pull_request.base.sha }} ${{ github.sha }} > pr_diff.txt | |
| - name: Upload PR Diff Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: pr-diff | |
| path: pr_diff.txt | |
| - name: Automatically Review Pull Request | |
| id: openhands_valid | |
| uses: ./ | |
| with: | |
| prompt: | | |
| Review the current pull request ${{ github.event.pull_request.number }} | |
| and send an overall PR review comment and each individual line-level comment to Github using Github REST API. | |
| if the PR is overall good without needing any code changes, | |
| just send an overall comment and a PR approval to Github using Github REST API. | |
| llm_api_key: ${{ secrets.LLM_API_KEY }} | |
| log_all_events: "true" | |
| github_token: ${{ secrets.REVIEW_BOT_GITHUB_TOKEN }} | |
| additional_env: | | |
| { | |
| "SELECTED_REPO": "${{ github.repository }}" | |
| } | |