Skip to content

Commit

Permalink
Fixed no files
Browse files Browse the repository at this point in the history
  • Loading branch information
mnocon committed Nov 29, 2024
1 parent 95c79af commit ddfbd43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/preview_comment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ jobs:
file_limit=100
build_url="https://ez-systems-developer-documentation--${{ github.event.pull_request.number }}.com.readthedocs.build/en/${{ github.event.pull_request.number }}/"
changed_files=$(git diff --name-only HEAD origin/$GITHUB_BASE_REF | grep -E ".md$")
changed_files=$(git diff --name-only HEAD origin/$GITHUB_BASE_REF | grep -E ".md$" || [[ $? == 1 ]])
number_of__changed_files=$(echo $changed_files | wc -l)
if [[ $number_of__changed_files -eq 0 ]] then:
if [[ $changed_files -eq "" ]] then:
comment="No markdown files changed, no preview needed."
elif [[ $number_of__changed_files -gt file_limit ]] then:
comment="Too many files modified in a single PR. Unable to post preview links, sorry!"
Expand Down

0 comments on commit ddfbd43

Please sign in to comment.