Skip to content

Commit

Permalink
Fixed glob and dots in links
Browse files Browse the repository at this point in the history
  • Loading branch information
mnocon committed Nov 30, 2024
1 parent 1ceb979 commit f457d43
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/preview_comment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ jobs:
comment="Preview of modified files: too many files modified in a single PR. Unable to post preview links, sorry!"
else
filenames=$(echo "$changed_files" | rev | cut -d / -f 1 | rev | cut -d . -f 1)
urls=$(echo "$changed_files" | cut -d / -f 2- | cut -d '.' -f 1 | sed -e "s ^ $build_url ")
left=$(yes "* [" | head -n "$number_of__changed_files" )
# Guess the URL based on Markdown file location. Remove the .md extension.
urls=$(echo "$changed_files" | cut -d / -f 2- | rev | cut -d '.' -f 2- | rev | sed -e "s ^ $build_url ")
left=$(yes "+ [" | head -n "$number_of__changed_files" )
middle=$(yes "](" | head -n "$number_of__changed_files" )
right=$(yes ")\n" | head -n "$number_of__changed_files" )
Expand Down

0 comments on commit f457d43

Please sign in to comment.