Skip to content

fix(docs-deploy): update preview comment when no docs pages changed - #431

Draft
claude[bot] wants to merge 1 commit into
mainfrom
fix/docs-deploy-comment-no-page-changes
Draft

claude[bot] wants to merge 1 commit into
mainfrom
fix/docs-deploy-comment-no-page-changes

Conversation

@claude

@claude claude Bot commented Oct 22, 2026

Copy link
Copy Markdown

Requested by Martijn Laarman · Slack thread

Before: When a PR only changes non-.md files under docs/ (e.g. elastic/elasticsearch#162984, which only touches docs/changelog.yml), the preview comment stays at "Building and deploying preview..." forever, even though the preview deployed successfully.

After: The comment is replaced with a "No docs pages changed in this PR" note and a link to the full preview.

This makes the comment job always update the existing preview comment when there are no changed .md pages.

How: In the "Comment on PR" step, the if (!hasSnippetOrCsv) return; early return in the changedMdFiles.length === 0 branch is removed. The existing find-or-create comment logic and preview URL now always run, with the message chosen by hasSnippetOrCsv: the existing snippets/data files wording is unchanged, and a new "no docs pages changed" wording is used otherwise. That was the only early return in the step. Validated with a YAML parse, actionlint v1.7.12 and a node --check of the extracted script. This was not tested end to end in a real workflow run.


Generated by Claude Code

PRs that only change non-.md files under docs/ left the
"Building and deploying preview..." comment in place forever. Always
replace it with a note and a link to the full preview.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VYk1MhwerU6vQowjJi4qDJ
@cla-checker-service

Copy link
Copy Markdown

❌ Author of the following commits did not sign a Contributor Agreement:
179fbec

Please, read and sign the above mentioned agreement if you want to contribute to this project

@claude claude Bot added the fix label Oct 22, 2026
@claude

claude Bot commented Oct 22, 2026

Copy link
Copy Markdown
Author

Two checks are red and aren't code issues: CLA (the commit author is not a signed Elastic contributor, so a signed contributor will need to re-author or take over the commit) and check-labels (added the fix label). No code change pending.


Generated by Claude Code

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant