Skip to content

Commit 75b268c

Browse files
chore(quality): CODEOWNERS + link check + markdown quality + README guard (#2)
1 parent 25625f5 commit 75b268c

File tree

4 files changed

+63
-0
lines changed

4 files changed

+63
-0
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
# Add team(s) or bot account(s) here instead of personal names.
33
# Example:
44
# * @org/maintainers
5+
README.md @maintainers

.github/workflows/link-check.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Link Check
2+
on:
3+
pull_request:
4+
paths: ['**/*.md']
5+
permissions:
6+
contents: read
7+
pull-requests: write
8+
jobs:
9+
lychee:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: lycheeverse/lychee-action@v1
14+
with:
15+
args: --verbose --no-progress --require-https --max-redirects 5 --retry-wait-time 2 --timeout 20s --exclude-private true **/*.md

.github/workflows/md-quality.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Markdown Quality
2+
on:
3+
pull_request:
4+
paths: ['**/*.md']
5+
jobs:
6+
quality:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
- name: Setup Node
11+
uses: actions/setup-node@v4
12+
with:
13+
node-version: '20'
14+
- run: npm i -g textlint @textlint/markdown textlint-rule-terminology textlint-rule-no-dead-link
15+
- run: |
16+
cat > .textlintrc.json <<'JSON'
17+
{
18+
"rules": {
19+
"terminology": true,
20+
"no-dead-link": { "checkRelative": true }
21+
}
22+
}
23+
JSON
24+
- run: textlint -f pretty-error '**/*.md'

.github/workflows/readme-guard.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: README Guard
2+
on:
3+
push:
4+
branches: [ main, master ]
5+
paths: [ 'README.md' ]
6+
permissions:
7+
contents: write
8+
pull-requests: write
9+
jobs:
10+
guard:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Create review PR for README change
15+
uses: peter-evans/create-pull-request@v6
16+
with:
17+
title: "Guard: Review README.md change"
18+
body: "Automated guard: Please review README changes."
19+
commit-message: "chore: guard README change"
20+
branch: "chore/readme-guard-${{ github.run_id }}"
21+
base: "${{ github.ref_name }}"
22+
add-paths: |
23+
README.md

0 commit comments

Comments
 (0)