【问题标题】:Probot : Octokit baseUrl overridingProbot:Octokit baseUrl 覆盖
【发布时间】:2018-09-26 18:37:26
【问题描述】:

我正在尝试通过查看此处提到的文档来创建一个新的 GitHub(probot) 应用程序https://probot.github.io/docs/development/。

我可以从存储库中获取事件,但在上下文中使用 Github Api 客户端执行任何操作时遇到问题 (https://probot.github.io/api/latest/Context.html)。从控制台我看到默认的@octokit 客户端指向http://api.github.com,而不是我的企业URL。是否需要做任何额外的事情来更改此 URL。

我对在 robot.on 方法中创建一个具有正确 URL 的新客户端犹豫不决,因为我们应该使用经过身份验证的客户端,即在上下文中可用。我在这里有什么遗漏吗?

22:01:15.370Z DEBUG github: GitHub request: GET /app/installations - 404 Not Found params: { "per_page": 100, "baseUrl": "https://api.github.com", "request": { "timeout": 0 } } 22:01:15.371Z ERROR probot: {"message":"Integration not found","documentation_url":"https://developer.github.com/v3"}

【问题讨论】:

    标签: octokit probot


    【解决方案1】:

    阅读更多文档后 (https://probot.github.io/docs/github-api/#github-enterprise) - 这可以通过设置属性 GHE_HOST 来实现

    【讨论】:

      【解决方案2】:

      我在使用企业 GitHub 帐户时遇到了类似的问题,并且能够通过设置 GHE_HOST 解决它。详情见以下链接:

      GitHub ERROR probot: Integration not found, documentation_url

      【讨论】:

        【解决方案3】:

        在我的 probot 的 .env 文件中设置以下属性解决了该问题。

        GHE_HOST=<<my GitHub enterprise url>>

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 2019-06-24
          • 1970-01-01
          • 1970-01-01
          • 2011-06-11
          • 2012-01-28
          • 2012-02-16
          • 1970-01-01
          相关资源
          最近更新 更多