Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Respect folder patch when modified only is used #184

Merged
merged 1 commit into from May 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Expand Up @@ -260,3 +260,6 @@ GitHub Action - Markdown link check follows the [GitHub recommended versioning s
<img src="https://i.imgur.com/1Q1YoHz.gif" alt="Buy me a coffee.">
</a>
</p>


See https://pubsadasdsadasdasdasdas.aasasdas.odasdarg/onlinepubs/9699919799/utilities/crontab.html#tag_20_25_07
8 changes: 6 additions & 2 deletions entrypoint.sh
Expand Up @@ -128,9 +128,9 @@ check_additional_files () {

if [ -n "$FILES" ]; then
if [ "$MAX_DEPTH" -ne -1 ]; then
FIND_CALL=('find' '.' '-type' 'f' '(' ${FILES} ')' '-not' '-path' './node_modules/*' '-maxdepth' "${MAX_DEPTH}" '-exec' 'markdown-link-check' '{}')
FIND_CALL=('find' ${FOLDERS} '-type' 'f' '(' ${FILES} ')' '-not' '-path' './node_modules/*' '-maxdepth' "${MAX_DEPTH}" '-exec' 'markdown-link-check' '{}')
else
FIND_CALL=('find' '.' '-type' 'f' '(' ${FILES} ')' '-not' '-path' './node_modules/*' '-exec' 'markdown-link-check' '{}')
FIND_CALL=('find' ${FOLDERS} '-type' 'f' '(' ${FILES} ')' '-not' '-path' './node_modules/*' '-exec' 'markdown-link-check' '{}')
fi

add_options
Expand Down Expand Up @@ -164,6 +164,10 @@ if [ "$CHECK_MODIFIED_FILES" = "yes" ]; then
git fetch origin "${BASE_BRANCH}" --depth=1 > /dev/null
MASTER_HASH=$(git rev-parse origin/"${BASE_BRANCH}")

if [ -z "$FOLDERS" ]; then
FOLDERS="."
fi

FIND_CALL=('markdown-link-check')

add_options
Expand Down
6 changes: 4 additions & 2 deletions md/dir2/level-1a.md
Expand Up @@ -6,7 +6,7 @@ www.google.com
[This is a broken link](https://www.exampleexample.cox)

[This is another broken link](http://ignored-domain.com) but its ignored using a
configuration file.
configuration file.

### Alpha

Expand All @@ -22,4 +22,6 @@ But [missing files are reported](missing-example.js).
[alpha]: #alpha
[charlie]: #charlie

External file: [Charlie](./file2.md/#charlie)
External file: [Charlie](./file2.md/#charlie)

Modified.