pull-release-notes
pull-release-notes
Last updated 4 months ago by nblagoev .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install pull-release-notes 
SYNC missed versions from official npm registry.

pull-release-notes

A command line utility to generate a PR changelog between two refs.

NPM package Build Status Dependencies Status Coverage Status

Usage

Install

npm install -g pull-release-notes

This relies on the GitHub API; you should create an API token, and place it in the GITHUB_TOKEN environment variable. It needs public_repo access if your repo is public, and repo access if your repo is private.

CLI

Generate a changelog with merget pull requests between v1.0.0 and v1.1.0

pull-release-notes -v -r user/repo v1.0.0...v1.1.0 > CHANGELOG.md

In another script

import { ReleaseNotes } from "pull-release-notes"

const releaseNotes = new ReleaseNotes({
    owner: "user",
    repo: "repo-name",
    fromTag: "v1.0.0",
    toTag: "v1.1.0",
    formatter: ReleaseNotes.defaultFormatter,
})

releaseNotes.pull()
    .then(output => {
        console.log(output)
    })
    .catch(err => {
        console.error("error", err)
    })

You can also write your own formatter:

import { PullRequestInfo } from "pull-release-notes"

function myChangelogFormatter(pr: PullRequestInfo): string {
    return `* [#${pr.number}](${pr.htmlURL}) - ${pr.title}`
}

Current Tags

  • 1.0.1                                ...           latest (4 months ago)

3 Versions

  • 1.0.1                                ...           4 months ago
  • 1.0.0                                ...           4 months ago
  • 0.0.1                                ...           4 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 3
Dependencies (3)
Dev Dependencies (12)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |