UmbrellaDocs / action-linkspector

Uncover broken links in your content using Linkspector GitHub action.
MIT License
11 stars 2 forks source link

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.

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.