Skip to content

Commit 4efc22d

Browse files
author
Adam Duncan
committed
Add additional logging for when trying to retrieve drone yaml file
1 parent bf03ae6 commit 4efc22d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/parsed-yaml-retriever.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ const getParsedYaml = gh => async data => {
1010
path: data.repo.config_path
1111
}
1212
const file = await promisify(gh.repos.getContent)(options)
13+
if (!file.content) {
14+
console.log('GH Response:', file)
15+
throw new Error('Unexpected response from GitHub')
16+
}
1317
contents = Buffer.from(file.content, 'base64').toString()
1418
}
1519
const docs = contents.split('\n---\n')

0 commit comments

Comments
 (0)