Skip to content

Add redirect warnings for removed/renamed docs in preview comments#18932

Merged
harupy merged 2 commits intomasterfrom
copilot/update-preview-comment-warning
Nov 20, 2025
Merged

Add redirect warnings for removed/renamed docs in preview comments#18932
harupy merged 2 commits intomasterfrom
copilot/update-preview-comment-warning

Conversation

Copy link
Contributor

Copilot AI commented Nov 20, 2025

Related Issues/PRs

#xxx

What changes are proposed in this pull request?

Documentation preview comments now warn maintainers when pages are removed or renamed, prompting them to add redirects to prevent 404 errors.

Changes:

  • Modified getCommentTemplate() in .github/workflows/preview-comment.js to append ⚠️ warnings to removed/renamed file statuses
  • Status display now shows:
    • (removed, ⚠️ add a redirect) for deleted pages
    • (renamed, ⚠️ add a redirect) for renamed pages
    • (added) and (modified) unchanged

Example output:

**Changed Pages (4)**

- [removed-page](https://preview.netlify.app/removed-page) (removed, ⚠️ add a redirect)
- [renamed-page](https://preview.netlify.app/renamed-page) (renamed, ⚠️ add a redirect)
- [added-page](https://preview.netlify.app/added-page) (added)
- [modified-page](https://preview.netlify.app/modified-page) (modified)

How is this PR tested?

  • Manual tests

Verified warning messages appear correctly for all file status types using a Node.js test script.

Does this PR require documentation update?

  • No. You can skip the rest of this section.

Release Notes

Is this a user-facing change?

  • No. You can skip the rest of this section.

What component(s), interfaces, languages, and integrations does this PR affect?

Components

  • area/build: Build and test infrastructure for MLflow
  • area/docs: MLflow documentation pages

How should the PR be classified in the release notes? Choose one:

  • rn/none - No description will be included. The PR will be mentioned only by the PR number in the "Small Bugfixes and Documentation Updates" section

Should this PR be included in the next patch release?

  • Yes (this PR will be cherry-picked and included in the next patch release)
  • No (this PR will be included in the next minor release)
Original prompt

Update .github/workflows/preview-comment.js to insert a warning message for removed/renamed files to avoid page-not-found

  • ... (removed, ⚠️ add a redirect)
  • ... (renamed, ⚠️ add a redirect)
  • ... (added)
  • ... (modified)

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@harupy harupy marked this pull request as ready for review November 20, 2025 04:46
@github-actions
Copy link
Contributor

@Copilot Thank you for the contribution! Could you fix the following issue(s)?

⚠ Invalid PR template

This PR does not appear to have been filed using the MLflow PR template. Please copy the PR template from here and fill it out.

Co-authored-by: harupy <17039389+harupy@users.noreply.github.com>
Copilot AI changed the title [WIP] Update preview comment to include warning for removed and renamed files Add redirect warnings for removed/renamed docs in preview comments Nov 20, 2025
Copilot AI requested a review from harupy November 20, 2025 04:59
@github-actions github-actions bot added v3.6.1 area/build Build and test infrastructure for MLflow area/docs Documentation issues rn/none List under Small Changes in Changelogs. labels Nov 20, 2025
@harupy harupy enabled auto-merge November 20, 2025 05:11
@harupy harupy removed the v3.6.1 label Nov 20, 2025
@harupy harupy added this pull request to the merge queue Nov 20, 2025
Merged via the queue into master with commit 142b00a Nov 20, 2025
54 of 56 checks passed
@harupy harupy deleted the copilot/update-preview-comment-warning branch November 20, 2025 05:47
Tian-Sky-Lan pushed a commit to Tian-Sky-Lan/mlflow that referenced this pull request Nov 24, 2025
…lflow#18932)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: harupy <17039389+harupy@users.noreply.github.com>
Signed-off-by: Tian Lan <sky.blue266000@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/build Build and test infrastructure for MLflow area/docs Documentation issues rn/none List under Small Changes in Changelogs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants