From cb516e48a249da51aef911eb9780f467686ea813 Mon Sep 17 00:00:00 2001 From: Bulat Date: Wed, 13 Nov 2024 17:09:56 +0700 Subject: [PATCH] updated GH actions workflow (#597) --- .github/workflows/openhands.yml | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/.github/workflows/openhands.yml b/.github/workflows/openhands.yml index dbcd118b..16e5bc24 100644 --- a/.github/workflows/openhands.yml +++ b/.github/workflows/openhands.yml @@ -1,19 +1,34 @@ -name: Resolve Issues with OpenHands +name: Resolve Issue with OpenHands on: issues: types: [labeled] + pull_request: + types: [labeled] + issue_comment: + types: [created] + +permissions: + contents: write + pull-requests: write + issues: write jobs: call-openhands-resolver: + if: | + ${{ + github.event.label.name == 'fix-me' || + (github.event_name == 'issue_comment' && + startsWith(github.event.comment.body, vars.OPENHANDS_MACRO || '@openhands-agent') && + (github.event.comment.author_association == 'OWNER' || github.event.comment.author_association == 'COLLABORATOR' || github.event.comment.author_association == 'MEMBER')) + }} uses: All-Hands-AI/openhands-resolver/.github/workflows/openhands-resolver.yml@main - if: github.event.label.name == 'fix-me' with: - issue_number: ${{ github.event.issue.number }} + macro: ${{ vars.OPENHANDS_MACRO || '@openhands-agent' }} + max_iterations: 50 secrets: PAT_TOKEN: ${{ secrets.PAT_TOKEN }} PAT_USERNAME: ${{ secrets.PAT_USERNAME }} - LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} - LLM_BASE_URL: ${{ secrets.LLM_BASE_URL }} + LLM_BASE_URL: ${{ secrets.LLM_BASE_URL }} \ No newline at end of file