Skip to content

Commit d31b15a

Browse files
authored
Merge pull request #541 from netwrix/dev
exclude docs/kb/ from Vale, Dale, and editorial review
2 parents 636c7fb + 831e8bc commit d31b15a

5 files changed

Lines changed: 14 additions & 2 deletions

File tree

.claude/hooks/post-edit-dale.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ if [ "$BASENAME" = "CLAUDE.md" ] || [ "$BASENAME" = "SKILL.md" ] || [ "$BASENAME
2929
exit 0
3030
fi
3131

32+
# Skip KB articles — they have their own style conventions
33+
if [[ "$FILE_PATH" == */docs/kb/* ]] || [[ "$FILE_PATH" == docs/kb/* ]]; then
34+
exit 0
35+
fi
36+
3237
# Output a context message that Claude will see
3338
jq -n --arg file "$FILE_PATH" '{
3439
hookSpecificOutput: {

.claude/skills/doc-pr/SKILL.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ If the environment variables are empty, check for positional arguments (`$1` = f
2626

2727
Split the comma-separated file list into individual file paths for processing.
2828

29+
**Exclude KB files:** Skip any file under `docs/kb/`. KB articles have their own style conventions and are not subject to Dale linting or editorial review. If the file list contains only KB files, post a comment noting that no reviewable files were found and exit.
30+
2931
## Stage 1: Dale Linting
3032

3133
For each changed file, invoke the Dale linter skill:

.github/workflows/claude-doc-pr.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
- 'docs/**/*.md'
1010
- '!docs/**/CLAUDE.md'
1111
- '!docs/**/SKILL.md'
12+
- '!docs/kb/**'
1213

1314
issue_comment:
1415
types: [created]
@@ -35,7 +36,7 @@ jobs:
3536
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3637
run: |
3738
PR_NUMBER=${{ github.event.pull_request.number }}
38-
CHANGED_MD_FILES=$(gh pr diff "$PR_NUMBER" --name-only | grep -E '^docs/.*\.md$' | grep -v '/CLAUDE\.md$' | grep -v '/SKILL\.md$' || true)
39+
CHANGED_MD_FILES=$(gh pr diff "$PR_NUMBER" --name-only | grep -E '^docs/.*\.md$' | grep -v '/CLAUDE\.md$' | grep -v '/SKILL\.md$' | grep -v '^docs/kb/' || true)
3940
if [ -z "$CHANGED_MD_FILES" ]; then
4041
echo "No docs markdown files changed"
4142
echo "files=" >> "$GITHUB_OUTPUT"

.github/workflows/vale-linter.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
- 'docs/**/*.md'
1010
- '!docs/**/CLAUDE.md'
1111
- '!docs/**/SKILL.md'
12+
- '!docs/kb/**'
1213

1314
jobs:
1415
vale-lint:
@@ -29,7 +30,7 @@ jobs:
2930
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3031
run: |
3132
PR_NUMBER=${{ github.event.pull_request.number }}
32-
CHANGED_MD_FILES=$(gh pr diff "$PR_NUMBER" --name-only | grep -E '^docs/.*\.md$' | grep -v '/CLAUDE\.md$' | grep -v '/SKILL\.md$' || true)
33+
CHANGED_MD_FILES=$(gh pr diff "$PR_NUMBER" --name-only | grep -E '^docs/.*\.md$' | grep -v '/CLAUDE\.md$' | grep -v '/SKILL\.md$' | grep -v '^docs/kb/' || true)
3334
if [ -z "$CHANGED_MD_FILES" ]; then
3435
echo "No docs markdown files changed"
3536
echo "count=0" >> "$GITHUB_OUTPUT"

.vale.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ MinAlertLevel = suggestion
33

44
[*.md]
55
BasedOnStyles = Netwrix
6+
7+
[docs/kb/**/*.md]
8+
BasedOnStyles =

0 commit comments

Comments
 (0)