Post blanket comment when only snippets or CSV files change - #238
Merged
Conversation
When a PR edits only _snippets/ or .csv files, changedMdFiles is empty and the comment step returned silently, leaving contributors with no preview entry point. Now: detect that case and post a fallback comment under the same title (so it deduplicates correctly on re-runs) linking to the preview index. PRs that mix page and snippet changes are unaffected. Closes: elastic/docs-builder#3220 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
reakaleek
approved these changes
Jul 22, 2026
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
When a PR edits only
_snippets/or.csvfiles,changedMdFilesis empty and the comment step returned silently — leaving contributors with no preview entry point. Kuni reported this exact case today in #docs.The previous fix attempt (docs-builder#3220) added a
list-dependentssubcommand to walk the reverse include graph. The team agreed a simpler blanket comment is sufficient and less complex (Martijn's review, thread in #docs).What
In the "Comment on PR" step, when
changedMdFilesis empty:## 🔍 Preview links for changed docstitle, linking to the preview indexThe fallback comment deduplicates correctly on re-runs (same title lookup). PRs that mix page and snippet changes are unaffected — they fall through to the existing per-page link logic.
Test plan
_snippets/files → preview comment should appear with the index link.mdchanges → no comment posted🤖 Generated with Claude Code