← 返回 Skills 列表

GitHub Skill article

toast-ui.release-notes

从标签发布 GitHub 发布说明。

Skill 文章 2026-08-26
QUICK USE 快速使用
安装依赖 npm install --save-dev @toast-ui/release-notes # Latest version
安装依赖 npm install --save-dev @toast-ui/release-notes@<version> # Specific version
安装依赖 npm install
克隆仓库 git clone https://github.com/nhn/toast-ui.release-notes.git

TOAST UI 工具:发布说明

GitHub 发布说明生成器。

GitHub release npm GitHub license PRs welcome code with hearth by NHN

image

🚩 目录

🎨 功能

  • 从标签创建发布说明。
  • 按提交类型对提交进行分组。
  • 添加下载链接。

💾 安装

TOAST UI 产品可以通过包管理器使用,也可以直接下载源代码。不过,我们强烈建议使用包管理器。

通过包管理器

TOAST UI 产品已注册到两个包管理器中,包括 npm。 你可以使用各个包管理器提供的命令方便地进行安装。 使用 npm 时,请确保在已安装 Node.js 的环境中运行它。

npm

$ npm install --save-dev @toast-ui/release-notes # Latest version
$ npm install --save-dev @toast-ui/release-notes@<version> # Specific version

下载源文件

🔨 使用

  1. 检查 package.json 是否具有 repository 属性。仓库 URL 应以 .git 结尾。
"repository": {
  "type": "git",
  "url": "https://github.com/username/repository-name.git"
}

// or for short expression
"repository": "https://github.com/username/repository-name.git"
  1. 将 GitHub 访问令牌注册为环境变量 TUIGITHUBTOKEN,或注册为 tui-note.config.js 中的 token 属性。要生成令牌,请参阅此处
// tui-note.config.js
module.exports = {
  token: 'your-github-token-for-toast-ui-release-notes'
}
  1. 将该命令作为脚本添加到项目的 package.json 文件中。
scripts: {
  "note": "tui-note"
}
  1. project root 上执行该命令。
# tag specified in the tui-note.config.file
# if you do not set a tag in a config file, latest tag
npm run note

# specific tag
# it will overwrite a tag in a config file
npm run note -- --tag={specific-tag}

添加配置文件

将配置文件添加到工作目录的根目录中。配置文件必须采用 tui-note.config.js 的形式。

选项类型描述
tokenstringtoast-ui.release-notes 使用的 GitHub 访问令牌。如果将令牌作为环境变量传入,则会覆盖此值。
tagstring用于创建发布说明的标签。如果将标签作为命令行参数传入,则会覆盖此值。(默认值:最新标签)
apiUrlstringGitHub API URL。如果使用企业版 GitHub,请设置企业版 GitHub URL(例如:github.your-enterprise-url.com/api/v3)。(默认值:https://api.github.com)
groupByobject确定如何按提交类型对提交进行分类。'key' 是 group name,'value' 是 array of types。(默认值:defaultConfig.groupBy
commitMessage.typefunction确定如何从提交消息中获取类型。(默认值:defaultConfig.commitMessage.type
template.commitfunction提交说明的模板。(默认值:defaultConfig.template.commit
downloads`function \object`用于下载文件的链接。(参考:defaultConfig.downloads

🔧 拉取请求步骤

TOAST UI 产品是开源的,因此你可以在修复问题后创建拉取请求(PR)。 运行 npm 脚本,并按照以下流程自行进行开发。

设置

master 分支复刻到你的个人仓库。 将其克隆到本地计算机,并安装 node 模块。 开始开发之前,应检查是否存在任何错误。

$ git clone https://github.com/{your-personal-repo}/toast-ui.release-notes.git
$ cd toast-ui.release-notes
$ npm install
$ npm run test

开发

让我们开始开发吧! 不要忘记添加测试用例,然后确保测试全部通过。

运行 karma 测试

$ npm run test

拉取请求

创建 PR 之前,先检查最后一次测试,并确认不存在任何错误。 如果没有错误,就提交并推送吧!

有关 PR 步骤的更多信息,请参阅“参与贡献”部分中的链接。

💬 参与贡献

🍞 TOAST UI 家族

📜 许可证

本软件根据 MIT License 授权,版权所有 © NHN