npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

pull-request-changelog

v1.5.2

Published

Generate changelog from conventional changelog for using in a pull request comment.

Downloads

337

Readme

pull-request-changelog

Add a sticky comment to a pull request with the changelog entries for the new commits.

Features:

  • Github action for easy integration with Github.
  • CLI and API for custom usage.
  • Supports both Conventional Changelog presets or a custom configuration.
  • Works with Semantic Release

example comment

Usage with Github Actions (recommended)

Create a workflow with these steps:

on:
  pull_request:

permissions:
  pull-requests: write

jobs:
  pr-changelog:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          ref: "${{ github.head_ref }}"
      - uses: actions/setup-node@v4
        with:
          node-version: 22.x
      - run: npm ci
      - name: Pull Requst Changelog
        uses: ext/pull-request-changelog@v1
        with:
          preset: conventional-changelog-conventionalcommits

[!NOTE] Node 22.x or later is required, make sure to specify node-version!

If you want to only run for pull requests targeting certain branches add:

 on:
   pull_request:
+    branches:
+      - main

Configuration

The following input parameters are provided, which can be passed to the with parameter. All parameters are optional.

Input parameter | Default | Description --- | --- | --- preset | | full name of an NPM package with a conventional changelog preset config | | path to a configuration file exporting a configuration template-dir | | directory with templates filename | "pr-changelog.md" | name of temporary file generated by script comment | true | If true a sticky comment will be added with the changelog. comment-id | "pull-request-changelog" | id passed to sticky-pull-request-commend fetch-depth | 100 | git commit depth version | "auto" | NPM script version (passed to npx). Default is to use same script version as action version. skip-install | | Skip installing NPM package (you need to manually ensure the package exists)

Usage with CLI

npx pull-request-changelog \
  --preset conventional-changelog-conventionalcommits \
  --from origin/main \
  --to HEAD

Do note that the full name of the preset must be specified, this is different to how conventional-changelog-cli handles -p.

Generate changelog from conventional changelog for using in a pull request comment.

Usage
  $ npx pull-request-changelog -f origin/main

Options
  --from, -f          Base branch/ref
  --to, -t            Pull request branch/ref (default: HEAD)
  --preset, -p        Conventional Changelog preset (NPM package)
  --config, -c        Conventional Changelog config (filename)
  --output, -o        Output file (default stdout)
  --template-dir, -T  Template directory

Other
  --help      Show usage
  --version   Show version

The template directory may contain the files:

- message.hbs for the main template
- header.hbs for the header partial
- footer.hbs for the footer partial

If you need to customize the configuration for the conventional-changelog preset create a new file default exporting a function wrapping the preset and use --config instead:

import conventionalChangelogConventionalcommits from "conventionallchangelog-conventionalcommits";

export default () => {
  return conventionalChangelogConventionalcommits({
    /* preset configuration */
  });
};
 npx pull-request-changelog \
-  --preset conventional-changelog-conventionalcommits \
+  --config my-config.mjs \
   --from origin/main \
   --to HEAD

Usage with API

import { pullRequestChangelog } from "pull-request-changelog";
import conventionalChangelogConventionalcommits from "conventionallchangelog-conventionalcommits";

const markdown = await pullRequestChangelog({
  config: conventionalChangelogConventionalcommits({
    /* preset configuration */
  }),
  git: {
    from: "origin/main",
    to: "HEAD",
  },
});