build: debug getDraftRelease call (#33073)

This commit is contained in:
Keeley Hammond
2022-02-24 11:03:56 -08:00
committed by GitHub
parent 339ae4c014
commit 4f27c367b1

View File

@@ -38,7 +38,10 @@ async function getDraftRelease (version, skipValidation) {
const releaseInfo = await octokit.repos.listReleases({
owner: 'electron',
repo: targetRepo
}).catch(err => {
console.error(`Failed to fetch releases: ${err}`);
});
console.log('releaseInfo: ', releaseInfo);
const versionToCheck = version || pkgVersion;
const drafts = releaseInfo.data.filter(release => {
@@ -46,6 +49,7 @@ async function getDraftRelease (version, skipValidation) {
});
const draft = drafts[0];
console.log('drafts: ', drafts);
if (!skipValidation) {
failureCount = 0;
check(drafts.length === 1, 'one draft exists', true);