Skip to content

Commit

Permalink
🐛 Fixed condition for thumbs down reaction
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
Corantin committed Oct 17, 2024
1 parent 83b131b commit 4c9882d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ai-code-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit 4c9882d

Please sign in to comment.