From 1ee51ca9a7a3ccc9f29c875b82ef3531f9ff7800 Mon Sep 17 00:00:00 2001 From: Thodoris Greasidis Date: Mon, 22 Apr 2019 20:09:00 +0300 Subject: [PATCH] Ensure not marking successful releases as canceled Resolves: #1178 Change-type: patch Signed-off-by: Thodoris Greasidis --- lib/utils/remote-build.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/utils/remote-build.ts b/lib/utils/remote-build.ts index c4c4fa4a..c7035404 100644 --- a/lib/utils/remote-build.ts +++ b/lib/utils/remote-build.ts @@ -204,6 +204,11 @@ async function cancelBuildIfNecessary(build: RemoteBuild): Promise { await build.sdk.pine.patch({ resource: 'release', id: build.releaseId, + options: { + $filter: { + status: { $ne: 'success' }, + }, + }, body: { status: 'cancelled', end_timestamp: Date.now(),