Skip to content

Conversation

Mpdreamz
Copy link
Member

  • Add docs-assembler repos build-all
  • Explicit username if github token is provided
  • Build narritive docs to root

@Copilot Copilot AI review requested due to automatic review settings March 12, 2025 15:47
@Mpdreamz Mpdreamz self-assigned this Mar 12, 2025
@Mpdreamz Mpdreamz requested a review from a team March 12, 2025 15:47
@Mpdreamz Mpdreamz changed the title feature/assembler build Initial v0 of docs-assembler repos build-all command. Mar 12, 2025
Copy link
Contributor

@Copilot 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 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]);
Copy link
Preview

Copilot AI Mar 12, 2025

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.

Suggested change
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.

@Mpdreamz Mpdreamz enabled auto-merge (squash) March 12, 2025 16:34
@Mpdreamz Mpdreamz merged commit ffd2121 into main Mar 12, 2025
8 checks passed
@Mpdreamz Mpdreamz deleted the feature/assembler-build branch March 12, 2025 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants