Skip to content
Snippets Groups Projects
Commit 79fc2631 authored by Ciro Santilli's avatar Ciro Santilli
Browse files

content

parent f7f3bc1f
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment