diff --git a/.github/workflows/openhands-resolver.yml b/.github/workflows/openhands-resolver.yml index 48051ad..8ebb451 100644 --- a/.github/workflows/openhands-resolver.yml +++ b/.github/workflows/openhands-resolver.yml @@ -1,35 +1,32 @@ -name: OpenHands Issue Resolver 🤖 +name: Resolve Issue with OpenHands on: issues: types: [labeled] + pull_request: + types: [labeled] issue_comment: types: [created] pull_request_review_comment: types: [created] + pull_request_review: + types: [submitted] permissions: contents: write - issues: write pull-requests: write + issues: write jobs: - resolve: - runs-on: ubuntu-latest - if: | - (github.event_name == 'issues' && github.event.label.name == 'fix-me') || - (contains(github.event.comment.body, '@openhands-agent')) - - steps: - - uses: actions/checkout@v4 - - - name: OpenHands Magic ✨ - uses: All-Hands-AI/OpenHands@main - with: - path: openhands/resolver - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - LLM_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} - LLM_MODEL: ${{ vars.LLM_MODEL || 'anthropic/claude-3-5-sonnet-20241022' }} - GITHUB_USERNAME: ${{ secrets.PAT_USERNAME }} - PAT_TOKEN: ${{ secrets.PAT_TOKEN }} + call-openhands-resolver: + uses: All-Hands-AI/OpenHands/.github/workflows/openhands-resolver.yml@main + with: + macro: ${{ vars.OPENHANDS_MACRO || '@openhands-agent' }} + max_iterations: ${{ fromJson(vars.OPENHANDS_MAX_ITER || 50) }} + base_container_image: ${{ vars.OPENHANDS_BASE_CONTAINER_IMAGE || '' }} + LLM_MODEL: ${{ vars.LLM_MODEL || 'anthropic/claude-3-5-sonnet-20241022' }} + secrets: + PAT_TOKEN: ${{ secrets.PAT_TOKEN }} + PAT_USERNAME: ${{ secrets.PAT_USERNAME }} + LLM_API_KEY: ${{ secrets.LLM_API_KEY }} + LLM_BASE_URL: ${{ secrets.LLM_BASE_URL }}