From 4c9882d22b7dbd96f4f637328f594a7a03dbf390 Mon Sep 17 00:00:00 2001 From: Corantin Date: Thu, 17 Oct 2024 11:39:53 -0400 Subject: [PATCH] :bug: Fixed condition for thumbs down reaction - Replaced the direct comparison of review outcome with 'failure' to a call to failure() function - This change ensures that the thumbs down reaction is added correctly when something goes wrong in the workflow --- .github/workflows/ai-code-review.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ai-code-review.yml b/.github/workflows/ai-code-review.yml index 5b6fea09..3bec16ba 100644 --- a/.github/workflows/ai-code-review.yml +++ b/.github/workflows/ai-code-review.yml @@ -97,7 +97,7 @@ jobs: log_level: "DEBUG" - name: Add thumbs down reaction if something went wrong - if: steps.review.outcome == 'failure' + if: failure() run: gh api graphql --silent --raw-field query="mutation AddReaction {addReaction(input:{subjectId:\"$NODE_ID\",content:THUMBS_DOWN}){reaction{content}subject{id}}}" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}