From 88e504a13d7051dc19ff2963dc2ae379028e8b7f Mon Sep 17 00:00:00 2001 From: "rohitvinodmalhotra@gmail.com" Date: Mon, 11 Nov 2024 09:41:59 -0500 Subject: [PATCH 1/2] add custom macro option --- .github/workflows/openhands-resolver.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/openhands-resolver.yml b/.github/workflows/openhands-resolver.yml index 9fe6e20..cedef39 100644 --- a/.github/workflows/openhands-resolver.yml +++ b/.github/workflows/openhands-resolver.yml @@ -7,6 +7,10 @@ on: required: false type: number default: 50 + macro: + required: false + type: string + default: "@openhands-agent" secrets: LLM_MODEL: required: true @@ -37,7 +41,7 @@ jobs: github.event_name == 'workflow_call' || github.event.label.name == 'fix-me' || github.event.label.name == 'fix-me-experimental' || - (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@openhands-agent')) + (github.event_name == 'issue_comment' && contains(github.event.comment.body, ${{ inputs.macro || '@openhands-agent' }})) runs-on: ubuntu-latest steps: - name: Checkout repository From d8f148c430884c10a03cc84d237539ce35adf340 Mon Sep 17 00:00:00 2001 From: "rohitvinodmalhotra@gmail.com" Date: Mon, 11 Nov 2024 09:42:12 -0500 Subject: [PATCH 2/2] update example with new trigger and macro option --- examples/openhands-resolver.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/examples/openhands-resolver.yml b/examples/openhands-resolver.yml index 610877e..b49b907 100644 --- a/examples/openhands-resolver.yml +++ b/examples/openhands-resolver.yml @@ -5,6 +5,8 @@ on: types: [labeled] pull_request: types: [labeled] + issue_comment: + types: [created] permissions: contents: write @@ -14,9 +16,12 @@ permissions: jobs: call-openhands-resolver: uses: All-Hands-AI/openhands-resolver/.github/workflows/openhands-resolver.yml@main - if: github.event.label.name == 'fix-me' + if: | + github.event.label.name == 'fix-me' || + (github.event_name == 'issue_comment' && contains(github.event.comment.body, ${{ inputs.macro || '@openhands-agent' }})) with: max_iterations: 50 + macro: "@openhands-agent" secrets: PAT_TOKEN: ${{ secrets.PAT_TOKEN }} PAT_USERNAME: ${{ secrets.PAT_USERNAME }}