Skip to content

[DEV-4124] Implement dirNames fetching for manifest generation and Crowdin upload#209

Open
Sebastiano-Bertolin wants to merge 11 commits into
DEV-4124-add-docs-structure-metadata-managementfrom
DEV-4124-fetch-dirNames-from-buckets
Open

[DEV-4124] Implement dirNames fetching for manifest generation and Crowdin upload#209
Sebastiano-Bertolin wants to merge 11 commits into
DEV-4124-add-docs-structure-metadata-managementfrom
DEV-4124-fetch-dirNames-from-buckets

Conversation

@Sebastiano-Bertolin
Copy link
Copy Markdown
Collaborator

This pull request updates the documentation and logic for the scripts that generate docs-structure.json and crowdin.yml, making the canonical list of documentation paths (dirNames.json) the new source of truth when no explicit path inputs are provided. Instead of scanning the entire docs/ directory by default, both scripts now fetch and use the paths from dirNames.json, ensuring consistency and reducing unnecessary processing. The implementation includes new error handling, updated script entry points, and improved documentation.

Key changes include:

Core Logic Changes:

  • When neither PATHS_TO_UPLOAD nor PATHS_TO_DELETE is provided, both generateDocStructure.ts and generateCrowdinConfig.ts fetch the canonical list of paths from dirNames.json and use only those for manifest and Crowdin config generation. The docs/ directory is never scanned wholesale anymore. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]

New Utility and API:

  • Added the fetchDirNamesPaths function to fetch and validate the canonical paths from DIR_NAMES_URL, with robust error handling for missing or malformed payloads. [1] [2] [3]

Script Behavior and Error Handling:

  • Both scripts now provide clear logging about which paths are being used and exit gracefully with error messages if the canonical list cannot be fetched or is empty. [1] [2] [3] [4]

Documentation Updates:

  • Updated README.md and upload_sources_to_crowdin_workflow.md to reflect the new default behavior, describing how the canonical path list is used and clarifying script logic for all input scenarios. [1] [2] [3] [4] [5]

Configuration and API Surface:

  • Introduced DIR_NAMES_URL as a constant and updated relevant interfaces and function signatures to support the new behavior. [1] [2]

These changes ensure that only the intended documentation paths are processed and uploaded, improving reliability and maintainability.

@Sebastiano-Bertolin Sebastiano-Bertolin self-assigned this May 29, 2026
Copy link
Copy Markdown
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 changes the manifest and Crowdin config generation flow so the published dirNames.json list becomes the default source of documentation paths when no explicit workflow inputs are supplied.

Changes:

  • Adds DIR_NAMES_URL and fetchDirNamesPaths for fetching canonical path inputs.
  • Updates both generation entry points to use dirNames fallback behavior.
  • Updates TypeScript config and documentation for the new default flow.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/docsStructure.ts Adds dirNames URL/fetch helper and rebuild-from-selected-paths manifest option.
src/generateDocStructure.ts Fetches dirNames and rebuilds the manifest when no upload/delete paths are provided.
src/generateCrowdinConfig.ts Fetches dirNames for empty upload input and generates Crowdin entries from selected paths.
src/README.md Documents the new dirNames fallback behavior.
upload_sources_to_crowdin_workflow.md Adds workflow-level explanation of dirNames as the default source.
tsconfig.json Updates TypeScript target/module settings.

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

Comment thread src/docsStructure.ts Outdated
Comment thread upload_sources_to_crowdin_workflow.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants