Skip to content

fix: using disableOverview the outcome was broken.#1609

Merged
tcorral merged 8 commits intodevelopfrom
fix/disableOverview-outcome-was-not-working
Aug 28, 2025
Merged

fix: using disableOverview the outcome was broken.#1609
tcorral merged 8 commits intodevelopfrom
fix/disableOverview-outcome-was-not-working

Conversation

@tcorral
Copy link
Collaborator

@tcorral tcorral commented Aug 27, 2025

  • Added missing tests for disableOverview
  • Problem when using disableOverview flag on which README, CHANGELOG, LICENSE and CONTRIBUTING only contained the content of the OVERVIEW page.
  • If there are no README, CHANGELOG, LICENSE and CONTRIBUTING but the flag is added it will still generate the OVERVIEW page as usual but it will show a warning when the documentation is generated.

tomas_backbase added 2 commits August 27, 2025 14:31
- Problem when using disableOverview flag on which README, CHANGELOG, LICENSE and CONTRIBUTING only contained the content of the OVERVIEW page.
…erview

- Added functionality to create a redirect page when the README is absent and the overview is disabled.
- Introduced a new 'redirect' template to handle the redirection logic.
- Updated application logic to include the new redirect page in the configuration.
- Enhanced HTML engine to recognize the new redirect context.
Copy link

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 fixes issues with the disableOverview flag where using it caused README, CHANGELOG, LICENSE and CONTRIBUTING pages to incorrectly contain overview content, and adds missing test coverage for this functionality.

  • Adds comprehensive tests for various scenarios when disableOverview is used
  • Fixes incorrect page context assignment that was causing content issues
  • Introduces a redirect mechanism when no README exists and overview is disabled

Reviewed Changes

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

Show a summary per file
File Description
test/src/cli/cli-disable-options.spec.ts Adds extensive test coverage for disableOverview scenarios
src/utils/utils.ts Minor type annotation improvement for a return object
src/templates/partials/redirect.hbs New redirect template for handling navigation when README is absent
src/templates/page.hbs Adds template handling for new context types (readme, changelog, contributing, license, redirect)
src/app/engines/html.engine.ts Registers the new redirect partial template
src/app/application.ts Fixes context assignment and adds redirect page creation logic

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

tomas_backbase added 6 commits August 27, 2025 17:35
- Eliminated the redirect template and associated logic for handling missing README files.
- Updated application logic to create a README page directly when the README is present.
- Adjusted HTML engine and template rendering to reflect the removal of the redirect context.
- Improved handling of various markdown contexts (README, CHANGELOG, CONTRIBUTING, LICENSE) in the page template.
- Updated application logic to always create an index.html page with README content when available.
- Enhanced the handling of overview pages, ensuring they are created even when the README is missing and the overview is not disabled.
- Improved error logging for missing markdown files, providing clearer warnings for users.
- Simplified the markdown retrieval process in the MarkdownEngine by removing unnecessary promise chaining.
- Removed unused import of 'node:constants' from utils.ts.
- Deleted outdated utility tests to streamline the codebase.
- Added new integration tests for application and utility functions to enhance coverage and ensure functionality.
…tests

- Deleted obsolete integration tests for application and utility functions to streamline the codebase.
- Introduced new CLI coverage tests to enhance testing of various command executions and ensure proper functionality across different scenarios.
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

Copy link
Contributor

@vogloblinsky vogloblinsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, seems correct

@tcorral tcorral merged commit d0df7f5 into develop Aug 28, 2025
8 of 9 checks passed
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