包详细信息

github-changelog

embroider-build42.4kMIT2.0.0

Generate a changelog from GitHub pull requests

changelog, github

自述文件

github-changelog

CI npm

PR-based changelog generator with monorepo support

Usage

npx github-changelog
## Unreleased (2018-05-24)

#### :bug: Bug Fix
* [#198](https://github.com/my-org/my-repo/pull/198) Avoid an infinite loop ([@helpful-hacker](https://github.com/helpful-hacker))

#### :house: Internal
* [#183](https://github.com/my-org/my-repo/pull/183) Standardize error messages ([@careful-coder](https://github.com/careful-coder))

#### Commiters: 2
- Helpful Hacker ([@helpful-hacker](https://github.com/helpful-hacker))
- [@careful-coder](https://github.com/careful-coder)

By default github-changelog will show all pull requests that have been merged since the latest tagged commit in the repository. That is however only true for pull requests with certain labels applied. The labels that are supported by default are:

  • breaking (:boom: Breaking Change)
  • enhancement (:rocket: Enhancement)
  • bug (:bug: Bug Fix)
  • documentation (:memo: Documentation)
  • internal (:house: Internal)

You can also use the --from and --to options to view a different range of pull requests:

npx github-changelog --from=v1.0.0 --to=v2.0.0

Monorepo support

If you have a packages folder and your projects in subfolders of that folder github-changelog will detect it and include the package names in the changelog for the relevant changes.

GitHub Token

Since github-changelog interacts with the GitHub API you may run into rate limiting issues which can be resolved by supplying a "personal access token":

export GITHUB_AUTH="..."

You'll need a personal access token for the GitHub API with the repo scope for private repositories or just public_repo scope for public repositories.

Configuration

You can configure github-changelog in various ways. The easiest way is by adding a changelog key to the package.json file of your project:

{
  // ...
  "changelog": {
    "labels": {
      "feature": "New Feature",
      "bug": "Bug Fix"
    }
  }
}

The supported options are:

  • repo: Your "org/repo" on GitHub (automatically inferred from the package.json file)

  • github: the github domain, default: github.com

  • nextVersion: Title for unreleased commits (e.g. Unreleased)

  • labels: GitHub PR labels mapped to changelog section headers

  • wildcardLabel: A label to identify commits that don't have a GitHub PR label which matches a value in labels. (e.g. unlabeled) By default, this has no value. Read more about this option.

  • ignoreCommitters: List of committers to ignore (exact or partial match). Useful for example to ignore commits from bots.

  • cacheDir: Path to a GitHub API response cache to avoid throttling (e.g. .changelog)

wildcardLabel

For some projects, it may be beneficial to list PRs in the changelog that don't have a matching label defined in the configuration labels. Listing these PRs also allows you to review the changelog and identify any PRs that should be re-labeled on GitHub. For example, forgetting to label a breaking change.

{
  // ...
  "changelog": {
    "wildcardLabel": "unlabeled"
  }
}

A default changlog heading of :present: Additional updates is set when a value for wildcardLabel is in the configuration.

## Unreleased (2018-05-24)

#### 🎁 Additional updates
* [#514](https://github.com/my-org/my-repo/pull/514) Setting to mute video ([@diligent-developer](https://github.com/diligent-developer))

You can overwrite the default heading by including the wildcardLabel value in the configuration's labels object. For example:

{
  // ...
  "changelog": {
    "labels": {
      "feature": "New Feature",
      "bug": "Bug Fix",
      "unlabeled": "Unlabeled PRs"
    },
    "wildcardLabel": "unlabeled"
  }
}

License

github-changelog is released under the MIT License.

更新日志

Changelog

Release (2025-03-05)

github-changelog 2.0.0 (major)

:boom: Breaking Change

  • github-changelog

:rocket: Enhancement

:bug: Bug Fix

  • github-changelog
    • #44 Revert "use github api to find pull request for commit" (@mansona)

:house: Internal

Committers: 2

Release (2025-02-23)

github-changelog 1.2.0 (minor)

:rocket: Enhancement

  • github-changelog
    • #33 support github enterpise url detection and env vars (@patricklx)

Committers: 1

Release (2025-01-25)

github-changelog 1.1.0 (minor)

:rocket: Enhancement

:house: Internal

Committers: 2

Release (2024-05-22)

github-changelog 1.0.2 (patch)

:bug: Bug Fix

  • github-changelog
    • #23 only process commits on the current branch (@mansona)
    • #24 Fix issue with similarly named packages matching the wrong package in the generated changelog. (@NullVoxPopuli)

Committers: 2

Release (2024-05-03)

github-changelog 1.0.1 (patch)

:bug: Bug Fix

  • github-changelog
    • #22 Apply ignoreCommitters config to PR creators (@nickschot)
    • #19 fix npm badge to point at the right package (@mansona)

Committers: 2

Release (2024-03-12)

github-changelog 1.0.0 (major)

:boom: Breaking Change

  • github-changelog
    • #17 swap everything to be github-changelog (@mansona)

Committers: 1

  • Chris Manson (@mansona)

    Release (2024-02-16)

@ef4/lerna-changelog 2.2.1 (patch)

:bug: Bug Fix

  • @ef4/lerna-changelog
    • #14 remove invisible character in unlabelled text (@mansona)

Committers: 1

  • Chris Manson (@mansona)

    Release (2024-02-16)

@ef4/lerna-changelog 2.2.0 (minor)

:rocket: Enhancement

  • @ef4/lerna-changelog
    • #11 Add a default implementation for unlabelled (@mansona)

Committers: 1

  • Chris Manson (@mansona)

    Release (2024-01-11)

@ef4/lerna-changelog 2.1.0 (minor)

:rocket: Enhancement

  • @ef4/lerna-changelog

:house: Internal

  • @ef4/lerna-changelog

Committers: 2

@ef4/lerna-changelog 2.0.0 (major)

:boom: Breaking Change

:rocket: Enhancement

  • #1 discover all packages in workspaces (@mansona)

:house: Internal

Committers: 1

Changes inherited from upstream after reset

:boom: Breaking Change

:rocket: Enhancement

:bug: Bug Fix

  • #296 Omit commiters line when all are filtered out (@petrch87)
  • #398 Fix handling of --next-version-from-metadata option (@contolini)
  • #259 Allow ; characters in merge commit messages (@tuchk4)
  • #189 Abort process when github response is not OK (@emmenko)

:memo: Documentation

  • #472 README: Recommend npx usage instead of global install (@Turbo87)

Committers

v0.8.3 (2019-11-11)

:rocket: Enhancement

:bug: Bug Fix

  • #155 Fix incorrect repo parsing for project names with . characters (@shrikanthkr)

:house: Internal

Committers: 3

v0.8.2 (2018-10-14)

:bug: Bug Fix

:house: Internal

Committers: 1

v0.8.1 (2018-10-10)

:rocket: Enhancement

:memo: Documentation

Committers: 2

v0.8.0 (2018-06-19)

:boom: Breaking Change

:rocket: Enhancement

:bug: Bug Fix

:memo: Documentation

:house: Internal

Committers: 1

v0.7.0 (2017-10-22)

:rocket: Enhancement

  • #81 Add support for nested/scoped packages. (@Turbo87)

:bug: Bug Fix

:house: Internal

  • #80 GitHubAPI class refactorings. (@Turbo87)
  • #72 Convert "cli" script to TypeScript and wrap in a run() function. (@Turbo87)

Committers: 1

v0.6.0 (2017-07-11)

  • Don't have to specify "repo" in the config
  • Have a set of default labels

:rocket: Enhancement

  • #71 configuration: Derive repo from package.json and use default labels. (@Turbo87)
  • #60 Add support for homu merge commits. (@Turbo87)

:bug: Bug Fix

  • #70 configuration-error: Add missing "message" property. (@Turbo87)
  • #64 progressBar: Split tick() into setTitle() and tick(). (@Turbo87)

:house: Internal

Committers: 1

v0.5.0 (2017-05-31)

  • Make lerna-changelog work better for a regular repo (including this one)

:rocket: Enhancement

  • #51 Use async/await to request commit infos concurrently. (@Turbo87)

:bug: Bug Fix

  • #53 Skip package heading for single package repos. (@Turbo87)

:house: Internal

  • #49 Exclude arrow functions, classes and generator functions from being transpiled. (@Turbo87)
  • #50 Update "jest" to v20.0.4. (@Turbo87)
  • #48 Adjust "lint" script. (@Turbo87)
  • #47 Move configuration from "lerna.json" into "package.json". (@Turbo87)

Committers: 1

v0.4.0 (2017-03-24)

Notable changes:

  • We dropped Node 0.10/0.12
  • Adds support for the "changelog" config key from "package.json" instead of from "lerna.json"
  • Removes "lerna" peerDep

Basically removes ties to lerna so can be used standalone.

:boom: Breaking Change

  • Other
    • #37 Babel: Use "preset-env" instead of "preset-es2015". (@Turbo87)

:rocket: Enhancement

  • Other
    • #42 Read "changelog" config key from "package.json" too. (@Turbo87)

:house: Internal

Committers: 1

v0.3.0 (2017-01-29)

:rocket: Enhancement

  • #31 New CLI options, custom tags range and tests.. (@emmenko)

:house: Internal

Committers: 2

v0.2.3 (2016-11-27)

:bug: Bug Fix

  • Other
    • #28 Convert label name to lowercase before matching. (@fson)

Committers: 1

  • Ville Immonen (fson)

v0.2.2 (2016-10-24)

:bug: Bug Fix

  • #27 match other closes keywords for github - Closes #7. (@hzoo)

Committers: 1

v0.2.1 (2016-07-29)

:bug: Bug Fix

  • #24 If there is no name, just print the username. (@hzoo)

Committers: 1

v0.2.0 (2016-06-17)

:rocket: Enhancement

  • #18 Consolidate changes by affected packages. (@gigabo)

:bug: Bug Fix

  • #13 Remove the --first-parent option from log list generation. (@gigabo)
  • #20 Nicer error message on missing config. (@gigabo)
  • #14 Update repository URLs in package.json. (@gigabo)

Committers: 1