mirror of
https://github.com/zhigang1992/now-deployment.git
synced 2026-04-29 04:25:28 +08:00
feat: list comments
This commit is contained in:
9
index.js
9
index.js
@@ -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',
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user