Skip to content

Fixes reporting issues without priority to console#1254

Merged
pascalberger merged 1 commit intocake-contrib:developfrom
pascalberger:feature/fix-console-reporting-withouth-issue
Sep 23, 2025
Merged

Fixes reporting issues without priority to console#1254
pascalberger merged 1 commit intocake-contrib:developfrom
pascalberger:feature/fix-console-reporting-withouth-issue

Conversation

@pascalberger
Copy link
Copy Markdown
Member

Fixes reporting of issues without a priority to console report

@pascalberger pascalberger requested a review from a team as a code owner September 13, 2025 09:40
Copilot AI review requested due to automatic review settings September 13, 2025 09:40
@pascalberger pascalberger added this to the 5.9.0 milestone Sep 13, 2025
Copy link
Copy Markdown

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 a bug where issues without a defined priority would cause exceptions when generating console reports. The fix involves updating the switch expressions to handle unknown/undefined priorities gracefully instead of throwing exceptions.

Key Changes

  • Replace exception-throwing default cases with safe fallback values in priority-to-color mappings
  • Add test coverage for issues with and without explicit priorities

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/Cake.Issues.Reporting.Console/IssueDiagnostic.cs Updated switch expressions to handle undefined priorities with fallback colors instead of throwing exceptions
src/Cake.Issues.Reporting.Console.Tests/ConsoleIssueReportGeneratorTests.cs Added test cases to verify reporting works for issues both with and without explicit priorities

@pascalberger pascalberger force-pushed the feature/fix-console-reporting-withouth-issue branch from f3282d7 to c9915b1 Compare September 13, 2025 09:41
@pascalberger pascalberger merged commit afa590d into cake-contrib:develop Sep 23, 2025
150 checks passed
@pascalberger pascalberger deleted the feature/fix-console-reporting-withouth-issue branch September 23, 2025 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area:Reporting:Console Reporting to console Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants