Skip to content
Merged
Show file tree
Hide file tree
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
43 changes: 43 additions & 0 deletions .docdrift.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# doc-drift-checker configuration. Reports README sections whose linked code
# changed while the section itself did not. Sections are linked to code through
# the file paths and relative links the docs mention.
docs:
- "README.md"
- "docs/*.md"

# A present `ignore` key replaces the built-in defaults, so they are repeated
# here. Release notes, the license and contribution guidelines are
# documentation, not code the README describes.
ignore:
# tests
- "**/*_test.go"
- "**/*.test.*"
- "**/*.spec.*"
- "**/test/**"
- "**/tests/**"
- "**/__tests__/**"
- "**/testdata/**"
# generated code
- "**/*.pb.go"
- "**/*_gen.go"
- "**/*.generated.*"
- "**/generated/**"
- "**/*.min.js"
# lockfiles
- "**/go.sum"
- "**/package-lock.json"
- "**/yarn.lock"
- "**/pnpm-lock.yaml"
- "**/composer.lock"
- "**/Cargo.lock"
- "**/Gemfile.lock"
- "**/poetry.lock"
- "**/uv.lock"
# vendored code
- "**/vendor/**"
- "**/node_modules/**"
- "**/third_party/**"
# release notes, license, contribution guidelines
- "CHANGELOG.md"
- "LICENSE"
- "CONTRIBUTING.md"
28 changes: 28 additions & 0 deletions .github/workflows/docs-drift.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Docs drift

on:
pull_request:

permissions:
contents: read

jobs:
docs-drift:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: stable
cache: false
- name: Install doc-drift-checker
run: |
GOBIN="$RUNNER_TEMP/bin" go install github.com/JtheGunner/doc-drift-checker/cmd/doc-drift-checker@v0.2.3
- name: Check documentation drift
env:
BASE_REF: ${{ github.base_ref }}
run: |
git fetch --no-tags origin "+refs/heads/${BASE_REF}:refs/remotes/origin/${BASE_REF}"
"$RUNNER_TEMP/bin/doc-drift-checker" check --base "origin/${BASE_REF}" --format github --warn-only
Loading