Skip to content

Commit b71ce4b

Browse files
committed
If max score is 0, don't show an error that your score is 0
1 parent 25538c1 commit b71ce4b

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

dist/index.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ async function generateSummaryReport(
110110
core.summary.addTable(rows)
111111
}
112112
await core.summary.write()
113-
if (score == 0) {
113+
if (score == 0 && max_score) {
114114
core.error('Score: 0')
115115
} else if (score != max_score) {
116116
core.warning(`Score: ${score}/${max_score}`)
@@ -241,7 +241,7 @@ export async function run(): Promise<void> {
241241
)
242242
}
243243
await generateSummaryReport(results, gradeResponse, regressionTestJob)
244-
if (results.score === 0) {
244+
if (results.score === 0 && results.max_score) {
245245
core.setFailed(
246246
'Score for this submission is 0. Please check to be sure that it conforms with the assignment instructions.'
247247
)

0 commit comments

Comments
 (0)