# @azu/github-label-setup 中文文档

规范地址：https://npmcn.com/package/%40azu/github-label-setup/

版本：5\.2\.0
npm 元数据更新时间：2026-10-18T02:03:26.343Z
中文译文更新时间：2026-11-07T22:34:54.170Z
软件包许可：MIT

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40azu/github-label-setup
原文对照：https://npmcn.com/package/%40azu/github-label-setup/?lang=original
项目主页：https://github.com/azu/github-label-setup
源码仓库：https://github.com/azu/github-label-setup

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：26.4 kB，14 个文件
- 模块格式：ES Module
- TypeScript 类型：包内自带
- 运行依赖：5 个
- 首次发布：2017-05-16T01:25:21.848Z
- 最新版本发布：2026-10-18T02:03:25.984Z
- 近 30 天下载量：2198（2026-10-08 至 2026-11-06，npm 官方下载统计）
- 已发布版本数：23（近 12 个月 2 个）

## 中文简介

GitHub 标签设置脚本.

## 安装

```sh
npm install @azu/github-label-setup
```

也可以使用：`pnpm add @azu/github-label-setup`、`yarn add @azu/github-label-setup`、`bun add @azu/github-label-setup`

## README

# @azu/github-label-setup (中文(简体) )

透视 GitHub 标签设置工具 .

[![demo](https://npmcn.com/package/%40azu/github-label-setup/img/demo.png)](https://github.com/azu/github-label-setup/issues/1)

-   创建启动 GitHub 标签
-   移动已存在的标签
-   无配置 - 已评为

## 安装

安装方式 [无](https://www.npmjs.com/)数字 :

```
npm install --global @azu/github-label-setup
```

## 使用量

此工具在没有任何配置的情况下有效 .

```
Usage
  $ github-label-setup --token xxx

Options

  -h, --help                  [Boolean] output usage information
  -l, --labels <path>         [Path:String] the path to look for the label configuration in. Default: labels.json
  --token <token>             [String] a GitHub access token (also settable with a GITHUB_TOKEN or GITHUB_ACCESS_TOKEN environment variable)
  -d, --dry-run               [Boolean] calculate the required label changes but do not apply them
  -A, --allow-added-labels    [Boolean] allow additional labels in the repo, and don't delete them
  
GitHub Release Options
  
  --addReleaseYml             [Boolean] add a .github/release.yml file
  --addReleaseYmlOutputPath   [Path:String] the path to write the .github/release.yml file to. Default: .github/release.yml

Examples
    # Overwrite labels in the current repository
    $ github-label-setup --token "$GITHUB_TOKEN"
    # Add labels to the current repository
    $ github-label-setup --token "$GITHUB_TOKEN" --allow-added-labels
    # Add .github/release.yml to integrate with GitHub Releases
    $ github-label-setup --addReleaseYml
```

您需要获得 GitHub 个人访问符来更新您的寄存器的标签 . 您需要生成 [GitHub 个人访问符](https://github.com/settings/tokens/new?scopes=repo) 与 `"repo"` 范围.

-   生成链接 : [https://github.com/ settings/tokens/ new?scopes=repo 互联网档案馆的存檔,存档日期2013-12-02](https://github.com/settings/tokens/new?scopes=repo)

这个工具是一个包装 `github-label-sync`。 。 。 .

-   [Financial-Times/github-label-sync:以尽可能少的破坏性操作来同步您的 GitHub 标签](https://github.com/Financial-Times/github-label-sync "Financial-Times/github-label-sync: Synchronise your GitHub labels with as few destructive operations as possible")

### 标签的 Npm 包

标签可以设置 `require`像 npm 软件包那样的可选路径 .

```
$ github-label-setup --token xxx --labels @owner/github-label-presets
```

见 [标签 JSON](https://github.com/Financial-Times/github-label-sync#label-json "Label JSON") 格式.

## 默认标签

这些是有意见的标签.

[![demo](https://npmcn.com/package/%40azu/github-label-setup/img/demo.png)](https://github.com/azu/github-label-setup/issues/1)

-   ![#ededed](https://placehold.co/15x15/ededed/ededed.png) 复制 - 这个问题或拉请求已经存在
-   ![#e99695](https://placehold.co/15x15/e99695/e99695.png) 需要帮助 - 需要额外关注
-   ![#7057ff](https://placehold.co/15x15/7057ff/7057ff.png) 好第一期 - 新来的好
-   ![#ee0701](https://placehold.co/15x15/ee0701/ee0701.png) 优先事项:关键
-   ![#d93f0b](https://placehold.co/15x15/d93f0b/d93f0b.png) 优先事项:高
-   ![#fbca04](https://placehold.co/15x15/fbca04/fbca04.png) 优先事项:中等
-   ![#0e8a16](https://placehold.co/15x15/0e8a16/0e8a16.png) 优先级:低
-   ![#000000](https://placehold.co/15x15/000000/000000.png) 状态: 被放弃 - 问题或拉请求为wontfix
-   ![#ee0701](https://placehold.co/15x15/ee0701/ee0701.png) 现状:受阻----该问题的进展受阻
-   ![#cccccc](https://placehold.co/15x15/cccccc/cccccc.png) 现状:在建-在建工程
-   ![#d4c5f9](https://placehold.co/15x15/d4c5f9/d4c5f9.png) 现况:提案 - 征求意见
-   ![#2E7733](https://placehold.co/15x15/2E7733/2E7733.png) 状态: PR 欢迎 - 欢迎拉请求
-   ![#fbca04](https://placehold.co/15x15/fbca04/fbca04.png) 现况:需要审查----请求审查评论
-   ![#F9C90A](https://placehold.co/15x15/F9C90A/F9C90A.png) 状态: 需要更多信息 - 缺少足够的信息以取得进展
-   ![#b60205](https://placehold.co/15x15/b60205/b60205.png) 类型: 中断更改 - 包括中断更改
-   ![#ee0701](https://placehold.co/15x15/ee0701/ee0701.png) 类型: Bug - 错误或错误修正
-   ![#0e8a16](https://placehold.co/15x15/0e8a16/0e8a16.png) 类型:文档 - 只有文档更改
-   ![#1d76db](https://placehold.co/15x15/1d76db/1d76db.png) 类型: 特性 - 新特性
-   ![#fbca04](https://placehold.co/15x15/fbca04/fbca04.png) 类型: 重构 - 代码更改,既不修正错误,也不添加特性
-   ![#257759](https://placehold.co/15x15/257759/257759.png) 类型: 测试 - 添加缺失的测试或更正已存在的测试
-   ![#abd406](https://placehold.co/15x15/abd406/abd406.png) 类型:维修-仓库维修
-   ![#ffd412](https://placehold.co/15x15/ffd412/ffd412.png) 类型: CI - 更改 CI 配置文件和脚本
-   ![#cc317c](https://placehold.co/15x15/cc317c/cc317c.png) 类型:问题 - 要求提供进一步信息
-   ![#ee0701](https://placehold.co/15x15/ee0701/ee0701.png) 类型:安全 - 脆弱性披露或解决安全问题
-   ![#de52a8](https://placehold.co/15x15/de52a8/de52a8.png) 类型:无障碍----影响残疾人的障碍
-   ![#0366d6](https://placehold.co/15x15/0366d6/0366d6.png) 类型: 依赖 - 依赖问题或依赖文件的更改
-   ![#0366d6](https://placehold.co/15x15/BFD4F2/BFD4F2.png) 类型: Meta - 与寄存器本身相关(此内容将不包含在"发行注释"中)
-   ![#0366d6](https://placehold.co/15x15/5319E7/5319E7.png) 类型: 释放 - 与释放过程有关(这不会包括在释放注释中)

## 与 GitHub 发布集成

GitHub 发布支持使用标签自动生成发布注释. `--addReleaseYml` 选项将添加 `.github/release.yml` 文档到您的仓库.

```bash
# Add .github/release.yml to integrate with GitHub Releases
$ github-label-setup --addReleaseYml
```

详见GitHub Release文档.

-   [配置自动生成的释放注释](https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes#configuring-automatically-generated-release-notes)

## 相关

-   [常规武器委员会](https://conventionalcommits.org/ "Conventional Commits")
-   [yoshuawuyts/github-标准标签:为 GitHub 项目创建一套标准的问题标签](https://github.com/yoshuawuyts/github-standard-labels "yoshuawuyts/github-standard-labels: Create a standard set of issue labels for a GitHub project")
-   [Financial-Times/github-label-sync:以尽可能少的破坏性操作来同步您的 GitHub 标签](https://github.com/Financial-Times/github-label-sync "Financial-Times/github-label-sync: Synchronise your GitHub labels with as few destructive operations as possible")
-   [MunGell/Awesome-for-Binners:一个很棒的初学者友好项目列表.](https://github.com/MunGell/awesome-for-beginners "MunGell/awesome-for-beginners: A list of awesome beginners-friendly projects.")
-   [heynameisdave/git-labelmaker:从命令行管理您的 GitHub 标签!](https://github.com/himynameisdave/git-labelmaker "himynameisdave/git-labelmaker: Manage your GitHub labels from the command line!")
-   [Sane GitHub 标签 – Dave Lunny – 中型](https://medium.com/@dave_lunny/sane-github-labels-c5d2e6004b63 "Sane GitHub Labels – Dave Lunny – Medium")

## 更改日志

见 [页面](https://github.com/azu/github-label-setup/releases)。 。 。 .

## 正在测试

安装相互依存关系并运行 `npm test`数字 :

```
npm i -d && npm test
```

## 捐款

拉出请求和星星总是受欢迎的.

对于错误和特性请求, [请创建一个问题](https://github.com/azu/github-label-setup/issues)。 。 。 .

1.  叉开它!
2.  创建您的特性分支 : `git checkout -b my-new-feature`
3.  提交更改 : `git commit -am 'Add some feature'`
4.  推到树枝上: `git push origin my-new-feature`
5.  提交拉动请求 : D

## 作者

-   [gi/zu](https://github.com/azu)
-   [推特/azu re (英语)](https://twitter.com/azu_re)

## 许可证

麻省理工学院

## 常见问题

### @azu/github-label-setup 是什么？

GitHub 标签设置脚本\.

### 如何安装 @azu/github-label-setup？

在项目目录运行 npm install @azu/github-label-setup，或使用 pnpm add / yarn add / bun add。它还提供命令行工具 github-label-setup，可以用 npx github-label-setup 直接运行。

### @azu/github-label-setup 支持 TypeScript 吗？

支持。包内自带 TypeScript 类型声明（package\.json 声明了 types 入口），安装后即可获得类型提示，无需再安装 @types 包。

### @azu/github-label-setup 支持 ESM 还是 CommonJS？

以 ES Module 形式发布，推荐使用 import 引入。在 CommonJS 项目中，Node\.js 20\.19\+ / 22\.12\+ 可以直接 require\(\) 不含顶层 await 的 ES Module，更早的版本需要改用动态 import\(\)。

### @azu/github-label-setup 可以商用吗？

@azu/github-label-setup 使用 MIT 许可。宽松许可：允许商业使用、修改和再分发，通常只需在分发时保留原版权与许可声明。以上为概括，不构成法律意见，请以许可原文为准。

### @azu/github-label-setup 的下载量有多少？

根据 npm 官方下载统计，@azu/github-label-setup 在 2026/10/08 – 2026/11/06 这 30 天内被下载 2,198 次，日均约 73 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入，适合横向比较热度，不能直接等同于使用人数。

### @azu/github-label-setup 还在维护吗？

最新版本 5\.2\.0 发布于 2026/10/18（21 天前）；至今共发布 23 个版本，其中过去 12 个月发布了 2 个；首次发布于 2017/05/16。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

