Skip to content

Update docs automation prompt#9094

Closed
amyblais wants to merge 2 commits into
masterfrom
amyblais-docsautomationfix
Closed

Update docs automation prompt#9094
amyblais wants to merge 2 commits into
masterfrom
amyblais-docsautomationfix

Conversation

@amyblais

@amyblais amyblais commented Jul 14, 2026

Copy link
Copy Markdown
Member

Fixes based on a test PR: #9093.

Server PR: mattermost/mattermost#37495

Copilot AI review requested due to automatic review settings July 14, 2026 11:40
@amyblais amyblais added the Work In Progress Not yet ready for review label Jul 14, 2026
@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The documentation automation prompt now requires a metadata comment, records prompt-injection attempts in its Notes field, and returns only metadata with Scope: None when fail conditions apply.

Changes

Documentation automation

Layer / File(s) Summary
Metadata and failure output contract
.github/prompts/draft_docs.md
Prompt-injection attempts are recorded in the metadata Notes field; required metadata fields and metadata-only failure output with Scope: None are defined.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive No description was provided, so its relation to the changeset cannot be assessed. Add a brief description of the docs automation prompt changes or note that none was provided.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title accurately reflects the main change: updates to the docs automation prompt.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch amyblais-docsautomationfix

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Comment thread .github/prompts/draft_docs.md
Comment thread .github/prompts/draft_docs.md

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 784e143 and d29e586.

📒 Files selected for processing (1)
  • .github/prompts/draft_docs.md

Comment thread .github/prompts/draft_docs.md
Comment thread .github/prompts/draft_docs.md Outdated
@github-actions

Copy link
Copy Markdown
Contributor

Newest code from mattermost has been published to preview environment for Git SHA d29e586

@github-actions

Copy link
Copy Markdown
Contributor

Newest code from mattermost has been published to preview environment for Git SHA 3cd8f89

@amyblais
amyblais requested a review from esethna July 14, 2026 11:48
@amyblais amyblais added 2: Editor Review Requires review by an editor and removed Work In Progress Not yet ready for review labels Jul 14, 2026
@esethna

esethna commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

@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?

@amyblais
amyblais removed the request for review from esethna July 15, 2026 05:09
@amyblais amyblais removed the 2: Editor Review Requires review by an editor label Jul 15, 2026
@amyblais amyblais closed this Jul 15, 2026
@amyblais
amyblais deleted the amyblais-docsautomationfix branch July 15, 2026 05:10
@amyblais

Copy link
Copy Markdown
Member Author

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 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants