@acot/acot-reporter-github 中文文档教程

发布于 3年前 浏览 12 项目主页 更新于 3年前

@acot/acot-reporter-github

@acot/cli 的 GitHub 记者。

Installation

通过 npm 安装:

$ npm install --save @acot/acot-reporter-github

Prerequisites

将 acot 与 GitHub 集成有一些必要的设置。

  1. Install the acot-a11y GitHub App in the repository where you want to use GitHub integration.
  2. Generate a token for GitHub integration from the token manager application.

Usage

module.exports = {
  reporters: [
    {
      use: '@acot/github',
      with: {
        token: '...',
      },
    },
  ],
};

Pass the token as an environment variable

如果您将令牌传递给 ACOT_GITHUB_APP_TOKEN 环境变量,GitHub 报告器将自动为您解析令牌。 这是一种避免将令牌直接写入配置文件的技术。

module.exports = {
  reporters: ['@acot/github'],
};

Enabling debug logging

如果您需要除错误之外的日志记录,启用 debug 选项会有所帮助。

module.exports = {
  reporters: [
    {
      use: '@acot/github',
      with: {
        debug: true,
      },
    },
  ],
};

@acot/acot-reporter-github

GitHub reporter for @acot/cli.

Installation

Install via npm:

$ npm install --save @acot/acot-reporter-github

Prerequisites

There are a few necessary setups for integrating acot with GitHub.

  1. Install the acot-a11y GitHub App in the repository where you want to use GitHub integration.
  2. Generate a token for GitHub integration from the token manager application.

Usage

module.exports = {
  reporters: [
    {
      use: '@acot/github',
      with: {
        token: '...',
      },
    },
  ],
};

Pass the token as an environment variable

If you pass a token to the ACOT_GITHUB_APP_TOKEN environment variable, the GitHub reporter will automatically resolve the token for you. It is one technique to avoid writing the token directly into the configuration file.

module.exports = {
  reporters: ['@acot/github'],
};

Enabling debug logging

If you need logging other than errors, enabling the debug option will help.

module.exports = {
  reporters: [
    {
      use: '@acot/github',
      with: {
        debug: true,
      },
    },
  ],
};
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文