chore: result => result.data (#16274)
* chore: result.draft => result.data.draft * also result.id
This commit is contained in:
parent
21d1849723
commit
c1ca8476f8
1 changed files with 2 additions and 2 deletions
|
@ -50,14 +50,14 @@ async function deleteDraft (releaseId, targetRepo) {
|
||||||
id: parseInt(releaseId, 10)
|
id: parseInt(releaseId, 10)
|
||||||
})
|
})
|
||||||
console.log(result)
|
console.log(result)
|
||||||
if (!result.draft) {
|
if (!result.data.draft) {
|
||||||
console.log(`${fail} published releases cannot be deleted.`)
|
console.log(`${fail} published releases cannot be deleted.`)
|
||||||
return false
|
return false
|
||||||
} else {
|
} else {
|
||||||
await github.repos.deleteRelease({
|
await github.repos.deleteRelease({
|
||||||
owner: 'electron',
|
owner: 'electron',
|
||||||
repo: targetRepo,
|
repo: targetRepo,
|
||||||
release_id: result.id
|
release_id: result.data.id
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
console.log(`${pass} successfully deleted draft with id ${releaseId} from ${targetRepo}`)
|
console.log(`${pass} successfully deleted draft with id ${releaseId} from ${targetRepo}`)
|
||||||
|
|
Loading…
Reference in a new issue