From f1dc1ed63e7fe4dba4d04b74110a8ef3c9a1b710 Mon Sep 17 00:00:00 2001 From: Name Date: Wed, 17 Jul 2024 16:51:47 -0700 Subject: [PATCH] lint: Add GH action to find HTTP resources returning a 404 error code --- .404-links.yml | 8 ++++++++ .github/workflows/markdown-lint.yml | 17 +++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 .404-links.yml create mode 100644 .github/workflows/markdown-lint.yml diff --git a/.404-links.yml b/.404-links.yml new file mode 100644 index 00000000..2d238777 --- /dev/null +++ b/.404-links.yml @@ -0,0 +1,8 @@ +# folder: docs/ # The folder that required to be parsed +httpsOnly: true # If you want enforce only HTTPS links +pullRequestReview: true # If you want a nice review in your pull requests +ignore: + urls: # Array of url to ignore, wildcarded + files: # Array of markdown file the action shouldn't parse. Addressed by relative path from the folder shared above +delay: + # 'https://gitlab.com': 500 # Perform a pause of 500ms at each call matching the url diff --git a/.github/workflows/markdown-lint.yml b/.github/workflows/markdown-lint.yml new file mode 100644 index 00000000..29d05132 --- /dev/null +++ b/.github/workflows/markdown-lint.yml @@ -0,0 +1,17 @@ +name: Markdown lint +# https://github.com/marketplace/actions/404-links +on: + push: + branches: [ master ] + pull_request: + types: [assigned, opened, synchronize, reopened] + +jobs: + check-links: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: 'restqa-404-links' + uses: restqa/404-links@3.1.4 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}