Skip to content

Sort documentation pages alphabetically in preview comments#18948

Merged
harupy merged 2 commits intomasterfrom
copilot/update-sorting-for-doc-pages
Nov 21, 2025
Merged

Sort documentation pages alphabetically in preview comments#18948
harupy merged 2 commits intomasterfrom
copilot/update-sorting-for-doc-pages

Conversation

Copy link
Contributor

Copilot AI commented Nov 21, 2025

Related Issues/PRs

#xxx

What changes are proposed in this pull request?

This PR updates the getChangedDocPages function in .github/workflows/preview-comment.js to alphabetically sort the returned documentation pages by path. This makes it easier for users to look up specific changed documentation pages in PR comments, especially when there are many changes.

Changes:

  • Added .sort((a, b) => a.page.localeCompare(b.page)) to sort pages alphabetically after collecting them
  • Updated JSDoc comment to document that the returned array is sorted alphabetically by page path

Example output (before - unsorted):

- tracking (modified)
- api/python (added)
- deployment/kubernetes (modified)
- api (modified)

Example output (after - sorted):

- api (modified)
- api/python (added)
- deployment/kubernetes (modified)
- tracking (modified)

How is this PR tested?

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

Manual testing:
Created comprehensive test scripts that verify:

  • Basic alphabetical sorting works correctly
  • Nested paths are sorted properly (e.g., api comes before api/python)
  • Path transformations still work correctly (classic-mlml)
  • Non-documentation files are filtered out correctly
  • All test cases pass successfully

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 should be selected for bug fixes, documentation updates, and other small changes. No should be selected for new features and larger changes. If you're unsure about the release classification of this PR, leave this unchecked to let the maintainers decide.

  • 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 getChangedDocPages in .github/workflows/preview-comment.js to alphabetically sort the returned pages by path for easier lookup


💡 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.

Co-authored-by: harupy <17039389+harupy@users.noreply.github.com>
@harupy harupy marked this pull request as ready for review November 21, 2025 03:39
@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.

Copilot AI changed the title [WIP] Update getChangedDocPages to sort pages alphabetically by path Sort documentation pages alphabetically in preview comments Nov 21, 2025
Copilot AI requested a review from harupy November 21, 2025 03:42
@harupy
Copy link
Member

harupy commented Nov 21, 2025

@copilot update the PR description following pull_request_template.md

Copy link
Contributor Author

Copilot AI commented Nov 21, 2025

@copilot update the PR description following pull_request_template.md

Updated the PR description to follow the pull_request_template.md format. The description now includes all required sections: Related Issues/PRs, What changes are proposed, How is this PR tested, Documentation update section, and Release Notes with appropriate component and classification selections.

Copilot AI requested a review from harupy November 21, 2025 04:02
@github-actions github-actions bot added area/build Build and test infrastructure for MLflow rn/none List under Small Changes in Changelogs. labels Nov 21, 2025
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 improves the usability of documentation preview comments by sorting changed documentation pages alphabetically by their path, making it easier to locate specific pages when multiple documentation files are modified.

Key Changes:

  • Added alphabetical sorting to the getChangedDocPages function using localeCompare()
  • Updated JSDoc documentation to reflect that returned pages are sorted alphabetically

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

@harupy harupy merged commit 4316fa1 into master Nov 21, 2025
72 of 90 checks passed
@harupy harupy deleted the copilot/update-sorting-for-doc-pages branch November 21, 2025 08:39
kevin-wangg pushed a commit to kevin-wangg/mlflow that referenced this pull request Nov 21, 2025
…8948)

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: Kevin Wang <kevinwang2040@gmail.com>
jimilp7 pushed a commit to backspace-org/mlflow that referenced this pull request Nov 21, 2025
…8948)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: harupy <17039389+harupy@users.noreply.github.com>
Tian-Sky-Lan pushed a commit to Tian-Sky-Lan/mlflow that referenced this pull request Nov 24, 2025
…8948)

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 rn/none List under Small Changes in Changelogs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants