Skip to content

Commit

Permalink
Adding exit code to the error logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Suyash878 committed Jan 7, 2025
1 parent 8f43f6d commit efa573e
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/coderabbit-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,18 @@ jobs:
pr-approval-trigger:
runs-on: ubuntu-latest
steps:
- name: Check if PR has been approved by coderabbitai
- name: Check if PR has been approved by CodeRabbit.ai
if: ${{ github.event_name == 'pull_request_review' && github.event.review.state == 'approved' }}
run: echo "This PR was approved by CodeRabbit.ai"

- name: Check if PR is not approved by coderabbitai
- name: Fail if PR is not approved by CodeRabbit.ai
if: ${{ github.event_name == 'pull_request_review' && github.event.review.state != 'approved' }}
run: echo "This PR was not approved by CodeRabbit.ai"
run: |
echo "This PR was not approved by CodeRabbit.ai"
exit 1 # Fail the workflow if the review is not approved
- name: Handle PR without review submission
- name: Fail if PR has not been reviewed by CodeRabbit.ai
if: ${{ github.event_name == 'pull_request' }}
run: echo "This PR has not yet been reviewed by coderabbitai"
run: |
echo "This PR has not yet been reviewed by CodeRabbit.ai"
exit 1 # Fail the workflow if no review has been submitted

0 comments on commit efa573e

Please sign in to comment.