You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* update msg publishing logic
* test: add example to StreamingResponse.send() docs
* docs: expand observability documentation with comprehensive examples and best practices
* fix: clarify docs sync evaluation criteria - ALWAYS sync if docs/ changed
* fix: add Write tool to allowed tools for creating new doc files
* fix: prevent Claude from fetching wrong PR data - use only context variables
* fix: prevent Claude from adding custom PR descriptions beyond template
* feat: update existing cloudflare-docs PR instead of creating duplicates
* fix: properly format comment body with newlines using printf
* fix: remove Co-Authored-By line from PR descriptions
* revert: restore observability.md to original state
Please review the changes in this PR and determine if they require documentation updates in cloudflare-docs:
88
98
89
-
- **DO sync if:**
90
-
- Documentation files in docs/ were directly changed
99
+
- **ALWAYS sync if ANY of these are true:**
100
+
- Documentation files in docs/ were directly changed (even if other non-doc files also changed)
91
101
- New public API features or functions were added
92
102
- Breaking changes that affect user-facing behavior
93
103
- New configuration options or environment variables
94
104
- New examples or usage patterns that should be documented
95
105
- Bug fixes that clarify documented behavior
96
106
97
-
- **DO NOT sync if:**
107
+
- **DO NOT sync ONLY if ALL changes are:**
98
108
- Only internal code refactoring with no behavior changes
99
109
- Test-only changes
100
-
- CI/workflow changes
110
+
- CI/workflow changes (UNLESS docs/ files also changed)
101
111
- Minor typo fixes in code comments
102
112
- Internal dependency updates with no API changes
103
113
114
+
**IMPORTANT**: If this PR includes ANY changes to files in the docs/ directory, you MUST proceed with the sync, even if the PR also includes other types of changes like workflow updates.
115
+
104
116
**Step 2: If Documentation Sync is Needed**
105
117
106
118
If you determine documentation updates are required, YOU MUST COMPLETE ALL STEPS:
# Check if bot comment already exists (look for unique marker)
164
+
EXISTING_COMMENT_ID=$(gh api repos/cloudflare/agents/issues/${PR_NUMBER}/comments --jq '.[] | select(.body | contains("docs-sync-bot-comment-marker")) | .id' | head -1)
129
165
130
-
COMMENT_BODY="📚 **Documentation sync PR:** $DOCS_PR_URL\n\n_This comment will be updated as the PR changes._"
166
+
# Create comment body with proper newlines using printf
167
+
COMMENT_BODY=$(printf '<!-- docs-sync-bot-comment-marker -->\n\n📚 **Documentation sync PR:** %s\n\n_This comment will be updated as the PR changes._' "$DOCS_PR_URL")
131
168
132
169
if [ -n "$EXISTING_COMMENT_ID" ]; then
133
-
# Edit existing comment
134
-
gh api --method PATCH /repos/${{ github.repository }}/issues/comments/$EXISTING_COMMENT_ID -f body="$COMMENT_BODY"
- Use the GH_TOKEN environment variable for authentication with gh CLI
177
216
- Adapt paths, links, and references as needed for cloudflare-docs structure
178
217
- Follow existing patterns in the cloudflare-docs repository
179
-
- Be conservative but thorough - when in doubt, create the sync PR for human review
218
+
- **DEFAULT TO SYNCING**: When in doubt about whether changes warrant a sync, ALWAYS create the sync PR for human review. It's better to create an unnecessary PR than to miss important documentation updates.
0 commit comments