Skip to content

duniul/changesets-changelog-clean

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

48 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

changesets-changelog-clean ๐Ÿ“

npm

A clean changelog entry generator with GitHub support for changesets.

Drop-in replacement for @changesets/changelog-github.

Usage

// .changeset/config.json

{
  "changelog": ["changesets-changelog-clean", { "repo": "repo-scope/repo-name" }]
  // ...rest of the config
}

Installation

npm install changesets-changelog-clean --save-dev

Examples

See CHANGELOG.md and this test changelog for examples of changelogs using this package.

Options

The options should be passed as the second argument in the array passed to the changelog key in the changeset config.

  "changelog": ["changesets-changelog-clean", { /* options */ }]
  • repo: The GitHub repo (including scope, like user or org) to link and look up PRs in (like repo-scope/repo-name).
    Required.
  • capitalize: Whether to capitalize the first letter of the summary.
    Default: true.
  • throwOnGithubError: Whether to throw and stop if there is an error when fetching from GitHub. Disabling can be useful if you want to generate a changelog for a change that hasn't been merged yet.
    Default: true.

Environment variables

Links are generated against https://github.com by default.

  • GITHUB_SERVER_URL: Base URL used for commit/PR/user links (like https://github.example.com).
    Default: https://github.com.
  • GITHUB_GRAPHQL_URL: GraphQL API endpoint used to look up PRs and authors (like https://github.example.com/api/graphql).
    Default: https://api.github.com/graphql.
  • GITHUB_TOKEN: Token used to authenticate the lookups above.

On GitHub Actions runners these are already set for you.

Motivation

The default @changesets/changelog-github generator is great, but it can be a bit hard to read.

  • It puts the PR and author name in front of the summary, so the summaries don't start on the same column.
  • It adds extra text, like the Thanks X, cluttering up the changelog.

I wanted a changelog generator that included the same type of links and information, but in a cleaner format.

About

๐Ÿ“ A clean changelog entry generator with Github support for changesets.

Topics

Resources

License

Stars

Watchers

Forks

Contributors