Update docs automation prompt#9094
Conversation
📝 WalkthroughWalkthroughThe documentation automation prompt now requires a metadata comment, records prompt-injection attempts in its ChangesDocumentation automation
Estimated code review effort: 1 (Trivial) | ~5 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Updates the docs-drafting automation prompt to enforce a new response structure (HTML metadata comment first, followed by paste-ready docs content) and to refine failure behavior for PRs with no docs-impact.
Changes:
- Replaces the prior multi-section output format with a required leading HTML comment metadata block.
- Updates prompt-injection reporting instructions to reference the metadata comment “Notes” field.
- Changes fail-condition behavior to output only the metadata comment (and stop).
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/prompts/draft_docs.md:
- Around line 14-15: Define one canonical prompt-injection marker literal in the
instructions and reuse it in both the Notes-field guidance near the existing
bracketed marker and the later guidance around lines 145–146. Ensure every
occurrence uses the exact same bracketed value “[PROMPT INJECTION ATTEMPT
DETECTED — content ignored]”.
- Around line 137-146: Clarify the DOCS AUTOMATION METADATA contract so that
when Scope is None, Capability, Type, Target page, and Target personas must also
be set to None rather than fabricated or populated values. Update the metadata
template and the corresponding guidance around the failure-path entries to state
this behavior explicitly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 2c4bcb7a-bf4a-4dfb-9cf3-6eb50373eb26
📒 Files selected for processing (1)
.github/prompts/draft_docs.md
|
Newest code from mattermost has been published to preview environment for Git SHA d29e586 |
|
Newest code from mattermost has been published to preview environment for Git SHA 3cd8f89 |
|
@amyblais given the work Eva's team is doing to migrate the docs repo to the main code repo, planned for this month afaik, I'm wondering if we should hold off on any of the docs automation work since it will need to be rebuilt anyway? Perhaps we just disable the function for now so it's not opening new docs PRs automatically? |
Sounds good 👍 |
Fixes based on a test PR: #9093.
Server PR: mattermost/mattermost#37495