我正在尝试记录我的 probot 应用程序的流程,但它们没有出现在我的终端中。我通过运行npx create-probot-app my-first-app
和选择项目来建立一个样板basic-ts
项目。
我的 index.ts 文件看起来像这样 -
import { Probot } from "probot";
export = (app: Probot) => {
app.log.info("Yay, my app is loaded");
app.on("issues.opened", async (context) => {
context.log.info("momo-issue")
const issueComment = context.issue({
body: "Thanks for opening this issue!",
});
await context.octokit.issues.createComment(issueComment);
});
};
该应用程序按预期工作,打开问题会提示机器人创建评论,但我添加的日志仍然丢失。
我已经多次重新启动服务器,但仍然看不到日志。
知道这里缺少什么吗?