From c1ca8476f8081b1cef3dd4c5198bff88fa221772 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Fri, 4 Jan 2019 11:26:14 -0800 Subject: [PATCH] chore: result => result.data (#16274) * chore: result.draft => result.data.draft * also result.id --- script/release-artifact-cleanup.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/release-artifact-cleanup.js b/script/release-artifact-cleanup.js index df4cfce45a9c..2c3cac697520 100755 --- a/script/release-artifact-cleanup.js +++ b/script/release-artifact-cleanup.js @@ -50,14 +50,14 @@ async function deleteDraft (releaseId, targetRepo) { id: parseInt(releaseId, 10) }) console.log(result) - if (!result.draft) { + if (!result.data.draft) { console.log(`${fail} published releases cannot be deleted.`) return false } else { await github.repos.deleteRelease({ owner: 'electron', repo: targetRepo, - release_id: result.id + release_id: result.data.id }) } console.log(`${pass} successfully deleted draft with id ${releaseId} from ${targetRepo}`)