1
0
mirror of https://github.com/cirosantilli/china-dictatorship.git synced 2025-09-09 06:00:40 +02:00
This commit is contained in:
Ciro Santilli
2022-08-03 03:01:11 +00:00
parent f7f3bc1f73
commit 79fc2631d6

View File

@@ -202,6 +202,21 @@ try {
ref: sha,
})
console.log('commit: ' + require('util').inspect(commit, { depth: null }))
let filename
for (const file of commit.data.files) {
filename = file.filename
if (filename.startsWith('articles/')) {
break
}
}
console.log('filename: ' + require('util').inspect(filename, { depth: null }));
const content = await octokit.rest.repos.getContent({
owner: 'duty-machine',
repo: 'news',
ref: sha,
path: filename,
})
console.log('content: ' + require('util').inspect(content, { depth: null }));
} catch (error) {
core.setFailed(error.message);
}