Skip to content

Add ToMarkdown method for generating Markdown build report#10

Merged
Malcolmnixon merged 3 commits intomainfrom
copilot/add-markdown-generation-method
Feb 3, 2026
Merged

Add ToMarkdown method for generating Markdown build report#10
Malcolmnixon merged 3 commits intomainfrom
copilot/add-markdown-generation-method

Conversation

Copy link
Contributor

Copilot AI commented Feb 2, 2026

Pull Request

Description

This PR implements the ToMarkdown method for the BuildInformation class to generate Markdown-formatted build reports. The method provides flexible control over report structure and content through configurable parameters.

Key Features

  • ToMarkdown Method: Generates structured markdown build reports with the following sections:
    • Build Report title
    • Version Information (current/previous versions and commit hashes)
    • Changes (non-bug issues with links)
    • Bugs Fixed (bug issues with links)
    • Known Issues (optional section)
  • Configurable Parameters:
    • headingDepth (default: 1) - Controls the root markdown heading level
    • includeKnownIssues (default: false) - Toggles inclusion of known issues section
  • Smart Table Handling: Empty tables display "N/A" cells to clearly indicate intentionally blank sections
  • Issue Links: All issues are rendered as markdown links using their URLs

Implementation Details

The method builds markdown reports using StringBuilder with proper table formatting. Table headers are generated once before conditional logic to eliminate code duplication. The implementation follows the existing code style with literate programming comments and XML documentation.

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code quality improvement

Related Issues

Issue linking handled by system.

Pre-Submission Checklist

Before submitting this pull request, ensure you have completed the following:

Build and Test

  • Code builds successfully: dotnet build --configuration Release
  • All tests pass: dotnet test --configuration Release
  • Code produces zero warnings

Code Quality

  • Code formatting is correct: dotnet format --verify-no-changes
  • New code has appropriate XML documentation comments
  • Static analyzer warnings have been addressed

Quality Checks

Please run the following checks before submitting:

  • Spell checker passes: cspell "**/*.{md,cs}"
  • Markdown linter passes: markdownlint "**/*.md"
  • YAML linter passes: yamllint '**/*.{yml,yaml}'

Testing

  • Added unit tests for new functionality
  • Updated existing tests if behavior changed
  • All tests follow the AAA (Arrange, Act, Assert) pattern
  • Test coverage is maintained or improved

Documentation

  • Updated README.md (if applicable)
  • Updated ARCHITECTURE.md (if applicable)
  • Added code examples for new features (if applicable)
  • Updated requirements.yaml (if applicable)

Additional Notes

Test Coverage

Added 7 comprehensive tests covering:

  • Basic markdown generation with default parameters
  • Known issues inclusion when requested
  • Custom heading depth support
  • Empty changes table with N/A display
  • Empty bugs table with N/A display
  • Issue links in proper markdown format
  • First release handling with N/A for previous version

All 70 tests pass (63 existing + 7 new).

Security

CodeQL analysis completed with zero alerts.

Original prompt

This section details on the original issue you should resolve

<issue_title>[Feature]: Markdown Generation</issue_title>
<issue_description>### Problem Statement

The Build Information record needs a means of generating a Markdown build report.

Proposed Solution

Add a ToMarkdown method which builds the report. The method should take parameters for:

  • Root markdown heading depth (default to 1)
  • A flag for whether to include known issues (default to false)

The information may best be represented using Markdown tables in sections clearly identifying what the sections contain. Tables that would be empty should instead have a single row of N/A cells to clearly identify that the table is intentionally blank. Links to issue URLs should be used where appropriate.

This should have appropriate testing to make sure the build report is generated with correct content.

Alternatives Considered

No response

Usage Examples

Benefits

Report generation is a key requirement of this product.

Priority

High - Blocking my use case

Willingness to Contribute

Yes, I can submit a pull request

Additional Context

No response

Checklist

  • I have searched existing issues to ensure this is not a duplicate
  • I have provided a clear description of the feature
  • I have explained why this feature would be useful</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@Malcolmnixon
Copy link
Contributor

@copilot Please begin work on this

@Malcolmnixon
Copy link
Contributor

@copilot You seemed to fail to start, and reported an error - please try to implement this again.

@Malcolmnixon
Copy link
Contributor

@copilot Github was indeed encountering issues and those may have been fixed. Could you try again?

Copilot AI and others added 2 commits February 2, 2026 23:38
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 2, 2026

@copilot Github was indeed encountering issues and those may have been fixed. Could you try again?

I've successfully implemented the ToMarkdown method for generating Markdown build reports. The implementation includes:

  • ToMarkdown method with configurable heading depth and optional known issues
  • Structured markdown sections with tables for version info, changes, bugs, and known issues
  • N/A placeholders for empty tables
  • Issue links in markdown format
  • 7 comprehensive tests covering all scenarios

All checks pass: 70 tests ✓, markdownlint ✓, cspell ✓, yamllint ✓, CodeQL ✓

Completed in commit fd72c99.

Copilot AI changed the title [WIP] Add ToMarkdown method for generating Markdown build report Add ToMarkdown method for generating Markdown build report Feb 2, 2026
@Malcolmnixon Malcolmnixon marked this pull request as ready for review February 3, 2026 14:14
@Malcolmnixon Malcolmnixon merged commit 9eb98ac into main Feb 3, 2026
10 checks passed
@Malcolmnixon Malcolmnixon deleted the copilot/add-markdown-generation-method branch February 3, 2026 14:14
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.

[Feature]: Markdown Generation

2 participants