Skip to content

Commit f4b8598

Browse files
authored
Merge pull request #368 from dkhunt27/nanHandling2
Nan handling
2 parents 2abd471 + fcdcea1 commit f4b8598

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

dist/index.js

Lines changed: 4 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.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "nx-code-coverage",
2+
"name": "action-nx-code-coverage",
33
"version": "0.0.0",
44
"description": "Github action for combining/compiling code coverage from an nx monorepo",
55
"main": "lib/index.js",
@@ -17,7 +17,7 @@
1717
},
1818
"repository": {
1919
"type": "git",
20-
"url": "git+https://github.com/dkhunt27/nx-code-coverage.git"
20+
"url": "git+https://github.com/dkhunt27/action-nx-code-coverage.git"
2121
},
2222
"keywords": [
2323
"actions",

src/comment.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ export const buildComment = ({
2323
if (
2424
result.diff !== undefined &&
2525
result.diff !== null &&
26-
(result.diff as unknown) !== 'Unknown'
26+
(result.diff as unknown) !== 'Unknown' &&
27+
!Number.isNaN(result.diff)
2728
) {
2829
if (result.diff < 0) {
2930
arrow = '▾'
@@ -48,7 +49,8 @@ export const buildComment = ({
4849
if (
4950
result.coverage === undefined ||
5051
result.coverage === null ||
51-
(result.coverage as unknown) === 'Unknown'
52+
(result.coverage as unknown) === 'Unknown' ||
53+
Number.isNaN(result.coverage)
5254
) {
5355
coverage = 'unknown'
5456
} else {

0 commit comments

Comments
 (0)