[DEV-4124] Add docs structure metadata management#208
Open
Sebastiano-Bertolin wants to merge 12 commits into
Open
Conversation
…fic file references
…update documentation
…ipts for Crowdin integration
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enhances the docs-to-Crowdin upload pipeline by enabling incremental updates and deletions in docs-structure.json, updating the GitHub Actions workflow to accept new inputs and avoid empty commits, and expanding documentation for maintainers.
Changes:
- Add incremental merge + deletion support to
docs-structure.jsongeneration and centralize requested-path parsing. - Update the upload workflow to accept
paths_to_delete, pass env vars consistently, and commitdocs-structure.jsononly when changed. - Rewrite/extend developer documentation explaining the workflow, scripts, and manifest.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| upload_sources_to_crowdin_workflow.md | New workflow deep-dive documentation for maintainers. |
| tsconfig.json | Broaden TS include globs to cover all scripts under src/. |
| src/README.md | Expanded documentation for scripts, manifest schema, and workflow inputs. |
| src/generateDocStructure.ts | Read upload/delete inputs and write manifest incrementally. |
| src/generateCrowdinConfig.ts | Reuse shared path parsing (removed local parser). |
| src/docsStructure.ts | Major refactor: merge/delete helpers, shared parsing, manifest write options. |
| .github/workflows/upload_sources_to_crowdin.yml | Add delete input, pass env vars, and conditionally commit manifest. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…cs' into DEV-4124-add-docs-structure-metadata-management
…cs' into DEV-4124-add-docs-structure-metadata-management
…cs' into DEV-4124-add-docs-structure-metadata-management
…cs' into DEV-4124-add-docs-structure-metadata-management
… are within the docs directory
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
This pull request introduces significant improvements to the documentation translation workflow and the supporting TypeScript scripts. The main focus is on enabling incremental updates and deletions to the
docs-structure.jsonmanifest, improving workflow flexibility, and refactoring code for maintainability and clarity.Enhancements to the GitHub Actions workflow:
docs-structure.jsononly when the file has actually changed, reducing unnecessary commits. [1] [2]Improvements to documentation and developer experience:
src/README.mdis rewritten for clarity, providing a high-level workflow overview, detailed script documentation, manifest schema explanation, and clear instructions for workflow usage.Major refactoring and new features in
docsStructure.ts:mergeManifestWithSelectedPathsmechanism, making it possible to update or remove only selected nodes without rebuilding the entire manifest. [1] [2]Script and interface updates:
generateDocStructure.tsscript now reads both upload and delete path inputs, passes them to the manifest writer, and logs actions for better traceability.WriteDocsStructureManifestOptionsinterface is introduced to support new options for manifest updates.Summary of most important changes:
Workflow and automation improvements:
paths_to_deleteinput in the GitHub Actions workflow, enabling removal of documentation nodes from the translation manifest. Workflow now commitsdocs-structure.jsononly if changed. (.github/workflows/upload_sources_to_crowdin.yml) [1] [2]Documentation and developer experience:
src/README.mdto provide a comprehensive overview of the workflow, scripts, manifest schema, and usage instructions.Incremental manifest update and deletion:
docsStructure.tsto support incremental updates and deletions indocs-structure.json, including new helpers for merging, node insertion, and deletion. [1] [2]parseRequestedDocsPathsfor consistent input parsing across scripts. [1] [2] [3] [4]Script interface and logging:
generateDocStructure.tsto accept and process both upload and delete paths, and improved logging for user feedback.WriteDocsStructureManifestOptionsinterface for manifest writing flexibility.