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
12 changes: 12 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
## Summary
<!-- Briefly describe what this PR changes -->

## Linked Issues
<!-- Make sure the linked issue is always provided eg: -->
<!-- Closes #XYZ, Fixes #XYZ, Resolves #XYZ -->


## Documentation
- [ ] No Docs Needed:

If this PR adds new feature or changes existing. Make sure documentation is adjusted accordingly. If the docs is not needed, please explain why.
60 changes: 60 additions & 0 deletions .github/workflows/docs-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Docs Check

on:
pull_request:
types: [opened, synchronize, reopened, edited]

jobs:
docs-check:
runs-on: ubuntu-latest
permissions:
pull-requests: read
contents: read

steps:
- uses: actions/checkout@v4

- name: Get PR body
id: get_pr
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const body = context.payload.pull_request.body || "";
fs.writeFileSync('pr_body.txt', body, 'utf8');
core.setOutput("body", body);

- name: Check for No Docs Needed checkbox
id: skip
run: |
if grep -Eiq '\[x\].*no docs needed' pr_body.txt; then
echo "🟡 'No Docs Needed' checked — skipping docs enforcement."
echo "skip=true" >> $GITHUB_OUTPUT
else
echo "skip=false" >> $GITHUB_OUTPUT
fi

- name: Get changed files
run: |
git fetch origin ${{ github.event.pull_request.base.ref }}
if git diff --name-only origin/${{ github.event.pull_request.base.ref }}..HEAD > changed_files.txt 2>/dev/null; then
echo "✅ Found changed files"
else
echo "⚠️ Could not determine changed files, using empty list"
echo "" > changed_files.txt
fi
cat changed_files.txt

- name: Enforce docs update
run: |
if [ "${{ steps.skip.outputs.skip }}" = "true" ]; then
echo "🟡 Skipping docs check (No Docs Needed checked)."
exit 0
fi

if grep -qE '^(docs/|CONTRIBUTING\.md$|README\.md$|CODE_OF_CONDUCT\.md$)' changed_files.txt; then
echo "✅ Docs updated."
else
echo "❌ No docs changes found and 'No Docs Needed' not checked."
exit 1
fi
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -331,3 +331,9 @@ Use the release script:
mise run release
```


## Documentation

All changes that modify existing features or introduce new functionality must include documentation updates as part of the pull request. Documentation files should be added or updated in the `docs` folder.

A GitHub workflow automatically checks that documentation requirements are met. If your change does not require documentation updates (e.g., bug fixes that don't change behavior, internal refactoring, or test-only changes), you must explicitly note this in your PR description.