From 5f43caec52815d60f56f7539203e44bcf8d81a65 Mon Sep 17 00:00:00 2001 From: Corantin Date: Thu, 17 Oct 2024 11:43:54 -0400 Subject: [PATCH] :recycle: Reordered workflow steps - Moved the "Add thumbs down reaction if something went wrong" step to a later part of the workflow. - This change ensures that the thumbs down reaction is added only after all other steps have been executed, including error logging. --- .github/workflows/ai-code-review.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ai-code-review.yml b/.github/workflows/ai-code-review.yml index 1121a0d6..f0520d92 100644 --- a/.github/workflows/ai-code-review.yml +++ b/.github/workflows/ai-code-review.yml @@ -96,13 +96,6 @@ jobs: When a line start with a minus (`-`) it means that the line was removed, when it starts with plus (`+`) it means that the line was added. log_level: "DEBUG" - - name: Add thumbs down reaction if something went wrong - 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 }} - NODE_ID: ${{ github.event.comment.node_id }} - - name: Get Gemini step log if: steps.review.outcome == 'failure' id: get-gemini-log @@ -124,3 +117,10 @@ jobs: repo: context.repo.repo, body: 'Gemini Code Review encountered an error. Here is the step log:\n\n```\n${{ steps.get-gemini-log.outputs.gemini_log }}\n```' }); + + - name: Add thumbs down reaction if something went wrong + 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 }} + NODE_ID: ${{ github.event.comment.node_id }}