@toast-ui/release-notes

2.0.1 • Public • Published

TOAST UI Tools: Release Notes

Github release notes generator.

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

image

🚩 Table of Contents

🎨 Features

  • Create a release note from a tag.
  • Group commits by their types.
  • Add links to download.

💾 Install

TOAST UI products can be used by using the package manager or downloading the source directly. However, we highly recommend using the package manager.

Via Package Manager

TOAST UI products are registered in two package managers, npm. You can conveniently install it using the commands provided by each package manager. When using npm, be sure to use it in the environment Node.js is installed.

npm

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

Download Source Files

🔨 Usage

  1. Check package.json has repository property. Repository url should end with .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. Register Github access token by TUI_GITHUB_TOKEN as an environment variable or token property in tui-note.config.js. To generate a token, please refer to this.
// tui-note.config.js
module.exports = {
  token: 'your-github-token-for-toast-ui-release-notes'
}
  1. Add the command as a script to the project's package.json file.
scripts: {
  "note": "tui-note"
}
  1. Execute the command on your 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}

Add a config file

Add your config files to the root of your working directory. The config file must be in the form of tui-note.config.js.

Option Type Description
token string Github access token for toast-ui.release-notes. If you pass a token as an environment variable, it will be overwritten.
tag string Tag to create a release note. If you pass a tag as the command line argument, it will be overwritten. (default: the latest tag)
apiUrl string Github API url. If you use the enterprise github, set your enterprise github url (ex. github.your-enterprise-url.com/api/v3). (default: https://api.github.com)
groupBy object Determine how to categorize commits by their types. 'key' is group name and 'value' is array of types. (default: defaultConfig.groupBy)
commitMessage.type function Determine how to get a type from a commit message. (default: defaultConfig.commitMessage.type)
template.commit function Note from a commit. (default: defaultConfig.template.commit)
downloads function | object Links to download the files. (reference: defaultConfig.downloads)

🔧 Pull Request Steps

TOAST UI products are open source, so you can create a pull request(PR) after you fix issues. Run npm scripts and develop yourself with the following process.

Setup

Fork master branch into your personal repository. Clone it to local computer. Install node modules. Before starting development, you should check to have any errors.

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

Develop

Let's start development! Don't miss adding test cases and then make green rights.

Run karma test

$ npm run test

Pull Request

Before PR, check to test lastly and then check any errors. If it has no error, commit and then push it!

For more information on PR's step, please see links of Contributing section.

💬 Contributing

🍞 TOAST UI Family

📜 License

This software is licensed under the MIT License © NHN.

Package Sidebar

Install

npm i @toast-ui/release-notes

Weekly Downloads

56

Version

2.0.1

License

MIT

Unpacked Size

24.5 kB

Total Files

8

Last publish

Collaborators

  • codepink
  • nhnent