0

我正在尝试记录我的 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);
  });
};

该应用程序按预期工作,打开问题会提示机器人创建评论,但我添加的日志仍然丢失。
我已经多次重新启动服务器,但仍然看不到日志。

知道这里缺少什么吗?

4

1 回答 1

0

日志没有出现,因为我没有重建我的应用程序。
一旦我运行yarn build日志开始显示......

于 2021-04-16T19:54:15.260 回答