https://github.com/zapier/release-notes
an npm module for pulling merged PRs and generating release notes from them
https://github.com/zapier/release-notes
Last synced: 11 months ago
JSON representation
an npm module for pulling merged PRs and generating release notes from them
- Host: GitHub
- URL: https://github.com/zapier/release-notes
- Owner: zapier
- License: mit
- Created: 2018-05-11T07:43:12.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2020-05-05T18:19:38.000Z (about 6 years ago)
- Last Synced: 2025-05-08T07:45:45.022Z (about 1 year ago)
- Language: TypeScript
- Size: 549 KB
- Stars: 2
- Watchers: 128
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# release-notes
[](https://www.npmjs.com/package/release-notes)
Generate markdown from all of the PRs that have been closed since your last release!
Originally used to generate notes for [zapier-platform-cli](https://github.com/zapier/zapier-platform-cli) and its related repos.
## Installation
```bash
npm i -g release-notes
```
## Usage
In its simplest form, invoking this pulls the names of all of the closed PRs since the last time the given repo had a release. If passed multiple repos, it'll use the most recent release of the first as the date to filter against.
For more info, run:
```bash
release-notes -h
```
### Limitations
Currently, this is only set up to pull from Github. It can be expanded to use other providers if there's interest though!
### Private Repos
If you need to access private repos, use either the `-t` flag or set your `GITHUB_API_TOKEN` before invoking the CLI.
## API
In addition to a CLI, this package exports two functions for use javascript:
### releaseNotes
The main method, this does calls to the github API and returns an object with a list of closed PRs grouped by repo name.
### formatMarkdown
Takes the above object of PRs and returns a nicely formatted markdown file. This is separate so if you want to build/parse the output yourself, it's easy to do.
It accepts an object with the following keys as the second parameter (all of which are optional):
| Key | Type | Description |
| --------- | ---------- | --------------------------------------------------------------------------------- |
| `keepOrg` | `boolean` | if true, list the repo as `/` instead of ``. Defaults to `false` |
| `order` | `string[]` | print the repos in this order (which can be different than the supplied order) |
| `version` | `string` | pre-fills the version number. Prints `MAJOR.MINOR.PATCH` if missing |