From 7b48a0178f062a86256dbd7ebf98f4eefb8b302e Mon Sep 17 00:00:00 2001 From: muhittincamdali Date: Tue, 12 Aug 2025 03:59:32 +0300 Subject: [PATCH] chore(quality): CODEOWNERS + link check + markdown quality + README guard --- .github/CODEOWNERS | 1 + .github/workflows/link-check.yml | 15 +++++++++++++++ .github/workflows/md-quality.yml | 24 ++++++++++++++++++++++++ .github/workflows/readme-guard.yml | 23 +++++++++++++++++++++++ 4 files changed, 63 insertions(+) create mode 100644 .github/workflows/link-check.yml create mode 100644 .github/workflows/md-quality.yml create mode 100644 .github/workflows/readme-guard.yml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 4a0b531..c5db865 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,2 +1,3 @@ # Default ownership * @maintainers +README.md @maintainers diff --git a/.github/workflows/link-check.yml b/.github/workflows/link-check.yml new file mode 100644 index 0000000..58c7f0a --- /dev/null +++ b/.github/workflows/link-check.yml @@ -0,0 +1,15 @@ +name: Link Check +on: + pull_request: + paths: ['**/*.md'] +permissions: + contents: read + pull-requests: write +jobs: + lychee: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: lycheeverse/lychee-action@v1 + with: + args: --verbose --no-progress --require-https --max-redirects 5 --retry-wait-time 2 --timeout 20s --exclude-private true **/*.md diff --git a/.github/workflows/md-quality.yml b/.github/workflows/md-quality.yml new file mode 100644 index 0000000..04fe061 --- /dev/null +++ b/.github/workflows/md-quality.yml @@ -0,0 +1,24 @@ +name: Markdown Quality +on: + pull_request: + paths: ['**/*.md'] +jobs: + quality: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: '20' + - run: npm i -g textlint @textlint/markdown textlint-rule-terminology textlint-rule-no-dead-link + - run: | + cat > .textlintrc.json <<'JSON' + { + "rules": { + "terminology": true, + "no-dead-link": { "checkRelative": true } + } + } + JSON + - run: textlint -f pretty-error '**/*.md' diff --git a/.github/workflows/readme-guard.yml b/.github/workflows/readme-guard.yml new file mode 100644 index 0000000..464be4e --- /dev/null +++ b/.github/workflows/readme-guard.yml @@ -0,0 +1,23 @@ +name: README Guard +on: + push: + branches: [ main, master ] + paths: [ 'README.md' ] +permissions: + contents: write + pull-requests: write +jobs: + guard: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Create review PR for README change + uses: peter-evans/create-pull-request@v6 + with: + title: "Guard: Review README.md change" + body: "Automated guard: Please review README changes." + commit-message: "chore: guard README change" + branch: "chore/readme-guard-${{ github.run_id }}" + base: "${{ github.ref_name }}" + add-paths: | + README.md