Skip to content

Commit 6182301

Browse files
authored
Merge pull request #228 from netwrix/dev
added doc review sync between public docs repo and private agents repo
2 parents 9f7a13c + 7d494ec commit 6182301

2 files changed

Lines changed: 20 additions & 13 deletions

File tree

.github/workflows/claude-documentation-reviewer.yml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -50,23 +50,20 @@ jobs:
5050
echo "count=$(echo "$CHANGED_MD_FILES" | wc -l | tr -d ' ')" >> "$GITHUB_OUTPUT"
5151
fi
5252
53-
- name: Checkout system prompt repository
54-
uses: actions/checkout@v4
55-
with:
56-
repository: netwrix-eng/internal-agents
57-
token: ${{ secrets.PRIVATE_AGENTS_REPO }}
58-
path: system-prompt-repo
59-
ref: main
60-
sparse-checkout: |
61-
agents/engineering/technical_writing/system.md
62-
sparse-checkout-cone-mode: false
63-
6453
- name: Read system prompt
54+
if: steps.changed-files.outputs.count > 0
6555
id: read-prompt
6656
run: |
57+
# Read from public repo's agents directory (synced from private repo)
58+
if [ ! -f "agents/engineering/technical_writing/technical_writer/system.md" ]; then
59+
echo "::warning::System prompt file not found at agents/engineering/technical_writing/technical_writer/system.md, proceeding without it"
60+
echo "prompt=" >> "$GITHUB_OUTPUT"
61+
exit 0
62+
fi
63+
6764
{
6865
echo "prompt<<EOF"
69-
cat system-prompt-repo/agents/engineering/technical_writing/system.md
66+
cat agents/engineering/technical_writing/technical_writer/system.md
7067
echo "" # Forces a newline to prevent EOF delimiter errors
7168
echo "EOF"
7269
} >> "$GITHUB_OUTPUT"
@@ -84,5 +81,5 @@ jobs:
8481
8582
claude_args: |
8683
--model claude-sonnet-4-5-20250929
87-
--append-system-prompt "${{ steps.read-prompt.outputs.prompt }}"
84+
${{ steps.read-prompt.outputs.prompt != '' && format('--append-system-prompt "{0}"', steps.read-prompt.outputs.prompt) || '' }}
8885
--allowedTools "Bash(npm install),Bash(npm run build),Bash(npm run test:*),Bash(npm run lint:*),Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<!--
2+
This file is automatically synced from netwrix-eng/internal-agents.
3+
Do not edit directly - changes will be overwritten.
4+
5+
Source: agents/engineering/technical_writing/technical_writer/system.md
6+
-->
7+
8+
# Documentation Review System Prompt
9+
10+
This file will be automatically populated when you push changes to the system prompt in the internal-agents repository.

0 commit comments

Comments
 (0)