mirror of
https://github.com/cirosantilli/china-dictatorship.git
synced 2025-09-09 06:00:40 +02:00
content
This commit is contained in:
15
action.js
15
action.js
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user