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

File Extension test doesn't match with default on check-modified-files-only #63

Closed
Matticusau opened this issue Aug 6, 2020 · 1 comment · Fixed by #64
Closed

File Extension test doesn't match with default on check-modified-files-only #63

Matticusau opened this issue Aug 6, 2020 · 1 comment · Fixed by #64

Comments

@Matticusau
Copy link

I have been using this config:

name: Check Markdown links

on:
  pull_request

jobs:
  markdown-link-check:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - uses: gaurav-nelson/github-action-markdown-link-check@v1
      with:
        use-quiet-mode: 'no'
        use-verbose-mode: 'yes'
        config-file: './.github/mlc_config.json'
        check-modified-files-only: 'yes'

While my own tests work locally with the command line tool, the action workflow never checks any file.

I forked the repo and added a bit of echo logging so i could test exactly what was going on. The extension test fails as it strips the leading . off the extension of the modified file as shown in this screen shot.

image

I cannot share the run log as it is from a private repo.

When I update the workflow yaml config with the file_extension: md this works around the issue:

image

Here's some of the solution options I am think about:

  • Update the default parameter value?
  • Update the documentation?
  • Update the if [ "${i##*.}" = "${FILE_EXTENSION}" ]; then code to ensure it includes the leading .

Thoughts? I'm happy to contribute once I know the direction you would like to take it.

@gaurav-nelson
Copy link
Owner

Thanks @Matticusau for reporting and debugging. I've fixed it with #64, will publish soon.

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