Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/r0mflip/ghtags
Generate changelog for a GitHub repo.
https://github.com/r0mflip/ghtags
changelog generator tags
Last synced: about 1 month ago
JSON representation
Generate changelog for a GitHub repo.
- Host: GitHub
- URL: https://github.com/r0mflip/ghtags
- Owner: r0mflip
- License: mit
- Created: 2020-05-23T09:53:01.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-07-01T16:34:28.000Z (over 4 years ago)
- Last Synced: 2024-10-01T16:16:29.675Z (about 2 months ago)
- Topics: changelog, generator, tags
- Language: JavaScript
- Homepage:
- Size: 21.5 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ghtags
Generate releases/changelog/history file from tags(default)/releases
of a GitHub repo.The output file is written in markdown and commit messages are used for tags.
> The [CHANGELOG.md](assets/CHANGELOG.md) in this repo is generated by using `ghtags`
> from the [releases](https://github.com/r0mflip/ghtags/releases/).## Installation
``` sh
$ npm i -g ghtags
```## Usage
``` sh
$ ghtags --repo expressjs/express \
--token \ # Personal access token for GitHub API
--out .md \ # Output to file, default is stdout
--releases # Use GitHub releases for data
```### Options
- `--repo ` Specify repo in `/` format (`-r`)
- `--token ` - GitHub access token (`-t`)
- `--out ` - Save formatted markdown output into file (`-o`)
- `--releases` - If specified gets info from releases [uses tags by default]
- `--noempty` - Skip entities with empty or same body as release name (`-n`)_**Note:**_ Equivalent of `--noempty` and `--out` are not available programatically
## API
```js
const getTags = require('ghtags');// getTags is an AsyncGeneratorFunction
// which returns an AsyncGenerator
const tagSpitter = getTags({
repo: 'expressjs/express',
token: '',
releases: false,
});(async _ => {
for await (const tag of tagSpitter) {
// Use tag of type
AsyncGenerator<{
url: String;
name: String;
author: String;
prerelease: Boolean;
date: String;
body: String;
}, void, unknown>
}
})();
```Know more about [Asynchronous generators](https://exploringjs.com/impatient-js/ch_async-iteration.html#async-generators)
# LICENSE
[MIT](LICENSE)