feat: list comments

This commit is contained in:
iam4x
2019-08-26 14:08:54 +02:00
parent 66a958d6c6
commit 29e3c47541

View File

@@ -4,10 +4,17 @@ const { Toolkit } = require('actions-toolkit')
Toolkit.run(async tools => {
tools.log.info(JSON.stringify(tools.context, null, 4));
await tools.github.issues.createComment({
const params = {
owner: tools.context.repo.owner,
repo: tools.context.repo.repo,
issue_number: tools.context.payload.pull_request.number,
};
const comments = await tools.github.issues.listComments(params);
tools.log.info(comments);
await tools.github.issues.createComment({
...params,
body: 'Auto Comment Test',
});