1
0
mirror of synced 2025-12-30 03:01:36 -05:00

Broken weekly content linting report (#42504)

Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
Co-authored-by: Peter Bengtsson <peterbe@github.com>
This commit is contained in:
Grace Park
2023-09-15 11:37:55 -07:00
committed by GitHub
parent 458a251909
commit 641d566d42
5 changed files with 282 additions and 136 deletions

View File

@@ -0,0 +1,40 @@
name: 'Lint entire content and data markdown files'
# **What it does**: Lints our content markdown weekly to ensure the content matches the specified styleguide. If errors exists, it opens a PR for the Docs content team to review.
# **Why we have it**: Extra precaution to run linter on the entire content/data directories.
# **Who does it impact**: Docs content.
on:
workflow_dispatch:
schedule:
- cron: '20 16 * * 0' # Run every day at 16:20 UTC / 8:20 PST every Sunday
permissions:
contents: read
issues: write
jobs:
lint-entire-content-data:
name: Lint entire content and data directories
if: github.repository == 'github/docs-internal'
runs-on: ubuntu-20.04-xl
steps:
- name: Check that gh CLI is installed
run: gh --version
- name: Check out repo's default branch
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
- name: Set up Node and dependencies
uses: ./.github/actions/node-npm-setup
- name: Run content linter
env:
GITHUB_TOKEN: ${{ secrets.DOCS_BOT_PAT_WRITEORG_PROJECT }}
REPORT_AUTHOR: docs-bot
REPORT_LABEL: broken content markdown report
REPORT_REPOSITORY: github/docs-content
timeout-minutes: 10
run: |
node src/content-linter/scripts/markdownlint.js --errors-only --paths content data --output-file /tmp/error-lints.json
node .github/actions-scripts/post-lints.js --path /tmp/error-lints.json