Skip to content

Commit

Permalink
fail the workflow till there are lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
OnkarRuikar committed Aug 1, 2023
1 parent fdd3794 commit ef19e6b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/pr-review-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ jobs:
echo "Running Prettier"
yarn prettier -w ${files_to_lint}
if [[ -n $(git diff) || "${MD_LINT_STATUS}" == "1" || "${FM_LINT_STATUS}" == "1" ]]; then
echo "CHANGES_REQUIRED=true" >> $GITHUB_ENV
fi
- name: Setup reviewdog
uses: reviewdog/action-setup@v1
with:
Expand Down Expand Up @@ -105,3 +109,9 @@ jobs:
run: |
echo "${{ env.FM_LINT_LOG }}"
exit 1
- name: Fail till changes are pending
if: env.CHANGES_REQUIRED == 'true'
run: |
echo "Please fix all the linting issues suggested in the review comments."
exit 1

0 comments on commit ef19e6b

Please sign in to comment.