Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
link-2

GitHub Action

Run Linkspector with reviewdog

v1.0.0

Run Linkspector with reviewdog

link-2

Run Linkspector with reviewdog

Run 💀Linkspector with 🐶reviewdog on pull requests to uncover broken links in your content

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Run Linkspector with reviewdog

uses: UmbrellaDocs/action-linkspector@v1.0.0

Learn more about this action in UmbrellaDocs/action-linkspector

Choose a version

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.