Skip to content

Commit

Permalink
♻️ Reordered workflow steps
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
Corantin committed Oct 17, 2024
1 parent 5417d7c commit 5f43cae
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/ai-code-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}

0 comments on commit 5f43cae

Please sign in to comment.