Skip to content

fix: correct reduce logic to properly determine lowest grade#13

Open
mateuszzawisza wants to merge 1 commit into
mbogh:mainfrom
physitrack:grade-fix
Open

fix: correct reduce logic to properly determine lowest grade#13
mateuszzawisza wants to merge 1 commit into
mbogh:mainfrom
physitrack:grade-fix

Conversation

@mateuszzawisza

@mateuszzawisza mateuszzawisza commented Oct 10, 2025

Copy link
Copy Markdown

Hello,

Thank you for your excellent work on the action. It has become very useful for me.

I've found a small bug in the grade parsing code that prevented action from finding the lowest grade correctly and in effect not failing workload when grade was under defined threshold. Proposed change fixes it for me.

Description

Previously, the reduce callback returned a boolean instead of an accumulator, causing lowestGrade to hold an incorrect value. Function was updated to return the grade object with the lowest value instead of a boolean.

Previously, the reduce callback returned a boolean instead of an accumulator,
causing `lowestGrade` to hold an incorrect value. Updated the function to
return the grade object with the lowest value instead of a boolean.
@mateuszzawisza mateuszzawisza changed the title Fix bug in finding lowest grade fix: correct reduce logic to properly determine lowest grade Oct 10, 2025
@mateuszzawisza mateuszzawisza marked this pull request as ready for review October 10, 2025 12:18
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.

1 participant