Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Add Markdownlint cleanup job #16036

Merged
merged 2 commits into from
Sep 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/markdown-lint-fix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Create Markdownlint auto-fix PR

on:
nschonni marked this conversation as resolved.
Show resolved Hide resolved
schedule:
- cron: "0 0 * * *"
workflow_dispatch:

jobs:
fix:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: "16"
cache: yarn

- name: Install all yarn packages
run: |
yarn --frozen-lockfile

- name: Lint markdown files
run: |
yarn lint:md

- name: Create PR with only fixable issues
if: success()
uses: peter-evans/create-pull-request@v4
with:
commit-message: "chore: auto-fix Markdownlint issues"
branch: markdownlint-auto-cleanup
title: "Markdownlint auto-cleanup"
author: mdn-bot <[email protected]>
body: |
caugner marked this conversation as resolved.
Show resolved Hide resolved
All issues auto-fixed

- name: Create PR with notice on unfixed issues
if: failure()
uses: peter-evans/create-pull-request@v4
with:
commit-message: "chore: auto-fix Markdownlint issues"
branch: markdownlint-auto-cleanup
title: "Markdownlint auto-cleanup"
author: mdn-bot <[email protected]>
body: |
Auto-fix was run, but additional issues found.
nschonni marked this conversation as resolved.
Show resolved Hide resolved
Please review the run log: https://github.com/mdn/content/actions/runs/${GITHUB_RUN_ID}?check_suite_focus=true#step:5:1