-
Notifications
You must be signed in to change notification settings - Fork 30
Initial v0 of docs-assembler repos build-all command. #725
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Mpdreamz
commented
Mar 12, 2025
- Add docs-assembler repos build-all
- Explicit username if github token is provided
- Build narritive docs to root
There was a problem hiding this 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 introduces the "assembler build" feature to support building all documentation repositories, explicitly handles GitHub tokens for repository origins, and builds narrative docs to the root directory.
- Added an AssemblerBuilder to manage the build-all process with improved exception handling.
- Refactored repository sourcing by replacing the legacy RepositoryCloner with a new RepositoryCheckoutProvider.
- Enhanced configuration deserialization to apply default repository values.
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
src/docs-assembler/Building/AssemblerBuilder.cs | Introduces the build-all functionality and enhanced exception handling. |
src/docs-assembler/Sourcing/RepositorySourcesFetcher.cs | Refactors repository sourcing and checkout aggregation. |
src/docs-assembler/Sourcing/Checkout.cs | Provides a new record for encapsulating checkout details. |
src/docs-assembler/Configuration/Repository.cs | Defines repository configurations with defaults. |
src/docs-assembler/Configuration/AssemblyConfiguration.cs | Updates deserialization with repository defaults based on the environment. |
src/docs-assembler/Cli/RepositoryCommands.cs | Updates CLI commands to incorporate the new build-all and clone-all behavior. |
src/Elastic.Markdown/BuildContext.cs | Adjusts the AllowIndexing property for proper URL path prefixing. |
src/docs-builder/Cli/Commands.cs | Corrects the AllowIndexing assignment logic. |
src/docs-assembler/AssembleContext.cs | Introduces a CheckoutDirectory property to support checkouts. |
src/docs-assembler/Sourcing/RepositoryCloner.cs | Removes the legacy repository cloner in favor of the RepositoryCheckoutProvider. |
Comments suppressed due to low confidence (1)
src/docs-assembler/Building/AssemblerBuilder.cs:31
- Consider replacing 'Console.WriteLine(e);' with '_logger.LogError(e, "An error occurred while building checkout.")' to ensure consistent logging throughout the application.
Console.WriteLine(e);
public IReadOnlyCollection<Checkout> GetAll() | ||
{ | ||
var fs = context.ReadFileSystem; | ||
var repositories = Configuration.ReferenceRepositories.Values.Concat<Repository>([Configuration.Narrative]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace the array literal '[Configuration.Narrative]' with a valid array initialization such as 'new[] { Configuration.Narrative }' to fix the syntax.
var repositories = Configuration.ReferenceRepositories.Values.Concat<Repository>([Configuration.Narrative]); | |
var repositories = Configuration.ReferenceRepositories.Values.Concat<Repository>(new[] { Configuration.Narrative }); |
Copilot uses AI. Check for mistakes.