From 12fd84db4a96519aff6ad8d96da187b8bba4cb6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Bj=C3=A4reholt?= Date: Thu, 29 Aug 2024 15:23:04 +0200 Subject: [PATCH] ci: fixes to bot action --- .github/actions/bot/action.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/actions/bot/action.yml b/.github/actions/bot/action.yml index 859f9ee0..455cbd01 100644 --- a/.github/actions/bot/action.yml +++ b/.github/actions/bot/action.yml @@ -41,11 +41,13 @@ runs: - name: Detect gptme command id: detect_command shell: bash + env: + COMMENT_BODY: ${{ inputs.comment_body }} run: | # Check if the comment starts with "@gptme" - if [[ "${{ inputs.comment_body }}" == "@gptme "* ]]; then + if [[ "$COMMENT_BODY" == "@gptme "* ]]; then # Extract the command - GPTME_COMMAND=${{ inputs.comment_body }}#"@gptme " + GPTME_COMMAND=${COMMENT_BODY#"@gptme "} { echo "gptme_command< issue.md gh issue view ${{ inputs.issue_number }} -c > comments.md @@ -226,7 +228,6 @@ runs: ISSUE_NUMBER: ${{ inputs.issue_number }} REPO_NAME: ${{ inputs.repo_name }} USER_NAME: ${{ inputs.user_name }} - shell: bash run: | RUN_URL="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" MESSAGE="I'm sorry, I could not fulfill your request. Please check the [log of this run]($RUN_URL) for more information."