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

check-modified-files-only filtering files incorrectly #48

Closed
Andarist opened this issue Jun 8, 2020 · 7 comments · Fixed by #49
Closed

check-modified-files-only filtering files incorrectly #48

Andarist opened this issue Jun 8, 2020 · 7 comments · Fixed by #49

Comments

@Andarist
Copy link

Andarist commented Jun 8, 2020

Followup to #43

This always compares against the last 3 characters whereas it should compare against the length of FILE_EXTENSION:

if [ ${i: -3} = "${FILE_EXTENSION}" ]; then

@gaurav-nelson
Copy link
Owner

🤦‍♂️

@gaurav-nelson
Copy link
Owner

@Andarist Can you please check it with the commit ID using:

 uses: gaurav-nelson/github-action-markdown-link-check@0eb8a0e

Want to confirm that the fix works before releasing it this time 😉

@gaurav-nelson
Copy link
Owner

Also I see a couple of PRs in the repository at https://github.com/livechat/livechat-public-docs
I'd love to see it work on Gatsby sites by don't yet figured out how to deal with slugs that don't always represent full file path.

@Andarist
Copy link
Author

Andarist commented Jun 9, 2020

Want to confirm that the fix works before releasing it this time 😉

I'm afraid it doesn't work 😅
https://github.com/livechat/livechat-public-docs/runs/753428367#step:4:16
There seems to be a syntax problem here:

if [ "$8" -eq 0 ]; then

I'd love to see it work on Gatsby sites by don't yet figured out how to deal with slugs that don't always represent full file path.

Hm, I was just trying to help out our content writer and I'm not involved in this project (I don't know how exactly it's set up with Gatsby etc) as I'm from the other team. I'm not sure when this could potentially affect them - ideally they should aim for 1 to 1 mapping between .mdx and the generated site so checking the correctness of in-repo links should pretty much guarantee that they would stay correct after compiling the site. But maybe this cannot be guaranteed at all times - I'm not sure.

@gaurav-nelson gaurav-nelson reopened this Jun 10, 2020
@gaurav-nelson
Copy link
Owner

gaurav-nelson commented Jun 15, 2020

@Andarist Can you please check it again using

uses: gaurav-nelson/github-action-markdown-link-check@619e549

I think this will work.

@Andarist
Copy link
Author

It doesn't crash, but doesn't work as expected. It has reported that all links are good here: https://github.com/livechat/livechat-public-docs/runs/775941325?check_suite_focus=true#step:4:29

whereas when running:

markdown-link-check ./content/management/configuration-api/v2.0/index.mdx

I get a report about 7 dead links

@gaurav-nelson
Copy link
Owner

Closing this one as well. #64 fixes this. Now it compares all file extension

if [ "${i##*.}" == "${FILE_EXTENSION#.}" ]; then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants