Skip to content

Add change type indicators to documentation preview comments#18729

Merged
harupy merged 2 commits intomasterfrom
copilot/update-preview-comment-change-type
Nov 7, 2025
Merged

Add change type indicators to documentation preview comments#18729
harupy merged 2 commits intomasterfrom
copilot/update-preview-comment-change-type

Conversation

Copy link
Contributor

Copilot AI commented Nov 7, 2025

Related Issues/PRs

#xxx

What changes are proposed in this pull request?

Updates .github/workflows/preview-comment.js to display file change types (added/removed/modified) alongside documentation page links in PR preview comments.

Changes:

  • fetchChangedFiles: Returns {filename, status} objects instead of filename strings
  • getChangedDocPages: Processes and preserves status through the pipeline
  • getCommentTemplate: Renders status in parentheses after each page link
  • Main function: Transforms data to maintain status throughout

Example output:

<details>
<summary>Changed Pages (3)</summary>

- [intro](https://example.com/intro) (modified)
- [getting-started](https://example.com/getting-started) (added)
- [api/reference](https://example.com/api/reference) (removed)

</details>

How is this PR tested?

  • Existing unit/integration tests
  • New unit/integration tests
  • Manual tests

Does this PR require documentation update?

  • No. You can skip the rest of this section.
  • Yes. I've updated:
    • Examples
    • API references
    • Instructions

Release Notes

Is this a user-facing change?

  • No. You can skip the rest of this section.
  • Yes. Give a description of this change to be included in the release notes for MLflow users.

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

Components

  • area/tracking: Tracking Service, tracking client APIs, autologging
  • area/models: MLmodel format, model serialization/deserialization, flavors
  • area/model-registry: Model Registry service, APIs, and the fluent client calls for Model Registry
  • area/scoring: MLflow Model server, model deployment tools, Spark UDFs
  • area/evaluation: MLflow model evaluation features, evaluation metrics, and evaluation workflows
  • area/gateway: MLflow AI Gateway client APIs, server, and third-party integrations
  • area/prompts: MLflow prompt engineering features, prompt templates, and prompt management
  • area/tracing: MLflow Tracing features, tracing APIs, and LLM tracing functionality
  • area/projects: MLproject format, project running backends
  • area/uiux: Front-end, user experience, plotting, JavaScript, JavaScript dev server
  • 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
  • rn/breaking-change - The PR will be mentioned in the "Breaking Changes" section
  • rn/feature - A new user-facing feature worth mentioning in the release notes
  • rn/bug-fix - A user-facing bug fix worth mentioning in the release notes
  • rn/documentation - A user-facing documentation change worth mentioning in the release notes

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

Upate .github/workflows/preview-comment.js to show the change type in the PR preview comment like below:

<details>
<summary>Changed Pages (${changedPages.length})</summary>

- [...](...) (removed)
- [...](...) (added)
- [...](...) (modified)

</details>

fetchChangedFiles now only returns file paths but needs be updated to return change types (status field from GitHub API) as well.


💡 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 7, 2025 05:37
@harupy harupy added the rn/none List under Small Changes in Changelogs. label Nov 7, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 7, 2025

@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 change types Add change type indicators to documentation preview comments Nov 7, 2025
Copilot AI requested a review from harupy November 7, 2025 05:51
@github-actions github-actions bot added the area/build Build and test infrastructure for MLflow label Nov 7, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 7, 2025

Documentation preview for e278dc8 is available at:

Changed Pages (1)
More info
  • Ignore this comment if this PR does not change the documentation.
  • The preview is updated when a new commit is pushed to this PR.
  • This comment was created by this workflow run.
  • The documentation was built by this workflow run.

@harupy harupy force-pushed the copilot/update-preview-comment-change-type branch from e278dc8 to 75bb2bc Compare November 7, 2025 07:07
@harupy harupy requested a review from Copilot November 7, 2025 07:07
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances the documentation preview comment workflow to include file status information (e.g., added, modified, removed) alongside the changed documentation pages. The changes propagate status data through the entire pipeline from fetching changed files to displaying them in the PR comment.

  • Modifies data structures from simple strings/arrays to objects containing both page/filename and status fields
  • Updates JSDoc type definitions to reflect the new object structures
  • Displays the status alongside each changed page link in the PR comment

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@harupy harupy merged commit fc5b06f into master Nov 7, 2025
108 of 131 checks passed
@harupy harupy deleted the copilot/update-preview-comment-change-type branch November 7, 2025 07:56
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 rn/none List under Small Changes in Changelogs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants