Repository navigation
fix(docs-deploy): update preview comment when no docs pages changed - #431
Draft
claude[bot] wants to merge 1 commit into
Draft
claude[bot] wants to merge 1 commit into
claude[bot] wants to merge 1 commit into
Conversation
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
|
❌ Author of the following commits did not sign a Contributor Agreement: Please, read and sign the above mentioned agreement if you want to contribute to this project |
Author
|
Two checks are red and aren't code issues: Generated by Claude Code |
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.
Requested by Martijn Laarman · Slack thread
Before: When a PR only changes non-
.mdfiles underdocs/(e.g. elastic/elasticsearch#162984, which only touchesdocs/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
commentjob always update the existing preview comment when there are no changed.mdpages.How: In the "Comment on PR" step, the
if (!hasSnippetOrCsv) return;early return in thechangedMdFiles.length === 0branch is removed. The existing find-or-create comment logic and preview URL now always run, with the message chosen byhasSnippetOrCsv: 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 anode --checkof the extracted script. This was not tested end to end in a real workflow run.Generated by Claude Code