From beb8b1837c99e9c58474ab67cd359c926aeb78b8 Mon Sep 17 00:00:00 2001 From: Dom Kriskovic Date: Fri, 14 May 2021 16:17:28 +0200 Subject: [PATCH 1/2] fix: handle no annotations in updateGithubCheck --- src/octokit.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/octokit.ts b/src/octokit.ts index 0416a2c..6c7699e 100644 --- a/src/octokit.ts +++ b/src/octokit.ts @@ -118,7 +118,7 @@ export const updateGithubCheck = ( conclusion: Conclusions, message?: string ) => { - const chunkedAnnotations = chunk(annotations); + const chunkedAnnotations = chunk(annotations.length ? annotations : []); const updateAttempts = chunkedAnnotations.map(annotationChunk => TE.tryCatch( From 7fc81d0aa07f2485fb692d64a2171af297c6c98c Mon Sep 17 00:00:00 2001 From: Dom Kriskovic Date: Fri, 14 May 2021 17:07:00 +0200 Subject: [PATCH 2/2] fix: default val --- src/octokit.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/octokit.ts b/src/octokit.ts index 6c7699e..099eff0 100644 --- a/src/octokit.ts +++ b/src/octokit.ts @@ -118,7 +118,7 @@ export const updateGithubCheck = ( conclusion: Conclusions, message?: string ) => { - const chunkedAnnotations = chunk(annotations.length ? annotations : []); + const chunkedAnnotations = annotations.length ? chunk(annotations) : [[]]; const updateAttempts = chunkedAnnotations.map(annotationChunk => TE.tryCatch(