Skip to content

Uncover broken links in your content using Linkspector GitHub action.

License

Notifications You must be signed in to change notification settings

UmbrellaDocs/action-linkspector

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

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Marketplace GitHub Release Donate using Liberapay

GitHub action: Run 💀Linkspector with 🐶Reviewdog

This action runs Linkspector with Reviewdog on pull requests to improve the quality of your content.

How to use

  1. Create a new file in your repository .github/workflows/action.yml.

  2. Copy-paste the following workflow in your action.yml file:

    name: Linkspector
    on: [pull_request]
    jobs:
      check-links:
        name: runner / linkspector
        runs-on: ubuntu-latest
        steps:
          - uses: actions/checkout@v4
          - name: Run linkspector
            uses: umbrelladocs/action-linkspector@v1
            with:
              github_token: ${{ secrets.github_token }}
              reporter: github-pr-review
              fail_on_error: true

Action inputs

github_token

(Optional) ${{ github.token }} is used by default.

level

(Optional) Report level for reviewdog [info,warning,error]. It's same as -level flag of reviewdog. Linkspector only reports errors, so if you change this value, you will not see any output.

reporter

Reporter of reviewdog command [github-pr-check,github-pr-review,github-check]. Default is github-pr-check. github-pr-review can use Markdown and add a link to rule page in reviewdog reports.

For more details, see Reporters.

filter_mode

(Optional) Filtering mode for the reviewdog command [added,diff_context,file,nofilter], the default value is added.

  • added: Show errors only in the added lines (with the + prefix).
  • diff_context: Show errors in the diff context, that is changed lines +-N lines (N=3 for example).
  • file: Show errors for added and modified files even if the results are not in actual diff.
  • nofilter: Show all errors across all files.

For more details, please see Filter mode support table.

fail_on_error

(Optional) Exit code for reviewdog when errors are found [true,false] Default is false.

reviewdog_flags

(Optional) Additional reviewdog flags.

config_file

(Optional) Path to your linkspector configuration file .linkspector.yml. For more details, see Linkspector configuration.