Skip to content

๐Ÿ”— Scan links in your repo to ensure they are valid. Works in private repos!

License

Notifications You must be signed in to change notification settings

TechWiz-3/linksafe

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

78 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Linksafe

Scan your repo for broken links. Whitelist links or files you wish to ignore. Works in private repos. Designed to be ideal for awesome-lists!

โšก Check out the fast branch if you want lightning fast checking for large volumes and very short run time.

Example usage

name: Link-check
on: [push]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Run linksafe
        uses: TechWiz-3/linksafe@main
        with: # comma seperated lists
          # use relative paths, if no dirs specified root dir is scanned
          dirs: ".,./src,./src/data,./tests,./tests/pylint"
          # set to false by default
          verbose: true
          whitelist_links: "https://xyz.xyz"
          # use relative paths
          whitelist_files: "./doc/HACKING.md"

More info

https://example.com and http://localhost are automatically ignored

Each directory to be scanned must be specified directly, otherwise only the root dir will be scanned and subdirs will be ignored. At the same time, if you want the root dir AND subdirs to be scanned, remember to include a . as part of the list.

Files and or links can be whitelisted i.e. ignored.

Please note, with repos with a lot of links, a scan can take a LONG time, even up to 40+ minutes. If you wish scans to be no longer than a minute or two, use the fast branch.

Todo

  • In depth error handling for user inputs (if they go wrong)
  • Recognition of removed yt videos
  • Emoji HTTP code (optional)
  • Enforce HTTPS option
  • Allow bad SSL cert option
  • Possible repo replacements, aliases or moves if a gh repo link fails
  • 429 error code

๐ŸŽ‰ Commit labels

If you're interested in the commit labels used in this repo, check out my git emoji project