GithubHelp home page GithubHelp logo

ruzickap / action-my-markdown-link-checker Goto Github PK

View Code? Open in Web Editor NEW
19.0 4.0 7.0 190 KB

A GitHub Action for checking broken links in Markdown files

License: Apache License 2.0

Dockerfile 33.03% Shell 66.97%
broken-links markdown github-action github-actions actions website checker links link-checker link-checking

action-my-markdown-link-checker's Introduction

action-my-markdown-link-checker's People

Contributors

deadex-ng avatar dependabot[bot] avatar github-actions[bot] avatar jj avatar my-renovate[bot] avatar renovate-bot avatar ruzickap avatar wiktor-k avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

action-my-markdown-link-checker's Issues

Bug: Validating GitHub links returns 404 when it should be 200

Describe the bug

Links for GitHub return 404 when they clearly exist.

To Reproduce

Check out the action run on this modest repo: https://github.com/parallaxsecond/community/runs/7108747802?check_suite_focus=true

The following fragment is of importance:

*** Running: markdown-link-check  ./minutes/2021-03-02.md
FILE: ./minutes/2021-03-02.md
  [โœ“] https://github.com/parallaxsecond/community/tree/master/minutes
  [โœ–] https://github.com/parallaxsecond/parsec/issues/350
  ERROR: 1 dead links found!
  [โœ“] https://github.com/parallaxsecond/parsec-tool
  [โœ“] https://codecov.io/gh/parallaxsecond
  4 links checked.
  [โœ–] https://github.com/parallaxsecond/parsec/issues/350 โ†’ Status: 404
*** ERROR: Something went wrong - see the errors above...

Expected behaviour
https://github.com/parallaxsecond/parsec/issues/350 is well and live it should not return 404.

Your YAML file
https://github.com/parallaxsecond/community/pull/90/files#diff-b803fcb7f17ed9235f1e5cb1fcd2f5d3b2838429d4368ae4c57ce4436577f03fR27

I'm actually not using any special options. Just one instruction

Additional context

I'm replacing our old link checker action with something modern. Unfortunately it seems checking too many github links results in 429 Too Many Requests responses in most of them. Adjusting concurrency doesn't help but GitHub responses do include Retry-After header so the scraper could take advantage of it.

Here I'm seeing unexpected 404s but I'm suspecting the cause is the same (I could be wrong though but I hope with the information given you can reproduce the issue).

Thanks for working on this super-useful action! ๐Ÿ‘‹

Bug: Twitter links are not working

Describe the bug
Twitter links are reporting 404 therefore markdown link checks fails

To Reproduce
Add any twitter link. eg: https://twitter.com/intent/follow?original_referer=https://github.com/&screen_name=

Expected behaviour
Since we cannot control twitter status code. Twitter links should be ignored until fixed on their end.

Screenshots
image

Your YAML file
A link to your repository and link to your YAML file

Additional context
Other libraries have decided to ignore it: tcort/markdown-link-check#199

Proposal: Expose option to print broken links only

Is your feature request related to a problem? Please describe
I'm always frustrated when I have to find errors in a log with hundreds of non-broken entries

Describe the solution you'd like
a with option like broken-only that omits all live links from the log and only prints:

  • The broken links
  • A summary line e.g., "Checked X links in Y files. Found Z broken links (see errors above)"

Describe alternatives you've considered

  • Configuration file does not seem to support this as an option
  • Will likely fork the action and grep errors at the bash level.

Additional context
Add any other context or screenshots about the feature request here.

Error: Callback was already called

Describe the bug
I was using the link checker 1.1.0. I was running it on a wiki with around 50 markdown files and around 2000 links. Unexpectedly, I got this error:

FILE: ./Season-of-Docs-2021.md
/usr/local/lib/node_modules/markdown-link-check/node_modules/async/dist/async.js:324
            if (fn === null) throw new Error("Callback was already called.");
                             ^

Error: Callback was already called.
    at /usr/local/lib/node_modules/markdown-link-check/node_modules/async/dist/async.js:324:36
    at /usr/local/lib/node_modules/markdown-link-check/node_modules/async/dist/async.js:248:17
    at /usr/local/lib/node_modules/markdown-link-check/index.js:129:13
    at /usr/local/lib/node_modules/markdown-link-check/node_modules/link-check/lib/proto/http.js:117:21
    at done (/usr/local/lib/node_modules/markdown-link-check/node_modules/needle/lib/needle.js:463:14)
    at PassThrough.<anonymous> (/usr/local/lib/node_modules/markdown-link-check/node_modules/needle/lib/needle.js:717:9)
    at PassThrough.emit (node:events:525:35)
    at endReadableNT (node:internal/streams/readable:1359:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

Node.js v19.4.0
*** ERROR: Something went wrong - see the errors above...

To Reproduce
I'm not sure how you can reproduce this error.

Expected behaviour
I expected the link checker to continue checking links in the rest of the files.

Your YAML file
A link to repository: repo
A link to YAML: YAML
Additional context
Link to workflow

Proposal: Check all files and return a list of all dead links

Is your feature request related to a problem? Please describe
I have an issue when I check multiple markdown files in a wiki. For example, I have 3 markdown files: first-good-file.md, first-bad-file.md and second-bad-file.md.
Assuming the files are checked in this order:

  1. first-good-file.md
  2. first-bad-file.md
  3. second-bad-file.md

When I run the link checker, it will stop execution when it encounters dead links in first-bad-file.md. It will not check the links in second-bad-file.md.

Describe the solution you'd like
The solution I would like is that the link checker, should check all the markdown files and return a list of all the deadlinks at the end.
In the case of the example: it should check first-good-file.md, first-bad-file.md and second-bad-file.md and give me a list of the dead links in both first-bad-file.md and second-bad-file.md

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Location: .github/renovate.json5
Error type: The renovate configuration file contains some invalid settings
Message: Invalid packageRules[2].schedule: 'Invalid schedule: "0 0,2,4 1-7 * 0" has cron syntax, but doesn't have * as minutes'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.