Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dragonraid/changelog-emitter
Creates changelog out of pull-request's titles
https://github.com/dragonraid/changelog-emitter
changelog github
Last synced: 13 days ago
JSON representation
Creates changelog out of pull-request's titles
- Host: GitHub
- URL: https://github.com/dragonraid/changelog-emitter
- Owner: dragonraid
- Created: 2021-04-10T14:56:49.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-30T15:05:35.000Z (11 months ago)
- Last Synced: 2024-10-06T02:17:16.270Z (about 2 months ago)
- Topics: changelog, github
- Language: TypeScript
- Homepage:
- Size: 360 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Changelog emitter
This github action fetches titles of pull requests between latest release and branch's HEAD and creates changelog from them.
## Inputs
| Input | Description | Example | Default | Required |
| :----------- | ----------------------------------------: | ------------------: | ---------------------------------------------------------: | -------: |
| github_token | github personal access token | `ghe_xyz` | **NO DEFAULT PROVIDED** | yes |
| branch | base branch of pull request | `main` | repositories default branch | no |
| title | changelog title | `Changelog` | date `YYYY/MM/DD` | no |
| prefix | prefix of pull request title in changelog | `*` | `-` | no |
| owner | owner or organization of repository | `dragonraid` | `GITHUB_REPOSITORY` environment variable (part before `/`) | no |
| repo | repository | `changelog-emitter` | `GITHUB_REPOSITORY` environment variable (part after `/`) | no |## Output
| Output | Description |
| :-------- | ---------------------------------: |
| changelog | text of changelog |
| isEmpty | whether text of changelog is empty |Text of changelog can also be accessed in subsequent steps via `CHANGELOG` environment variable.
## Example
This example, together with other useful github actions, creates new release with pull requests titles as release's body.
```yaml
name: releaseon:
push:
branches:
- mainjobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2- name: Create changelog
id: changelog
uses: dragonraid/changelog-emitter
with:
github_token: ${{ secrets.GITHUB_TOKEN }}- name: Bump tag
if: steps.changelog.outputs.isEmpty == false
id: tag
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
release_branches: main
default_bump: minor- name: Create github release
if: steps.changelog.outputs.isEmpty == false
uses: actions/github-script@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.repos.createRelease({
owner: context.repo.owner,
repo: context.repo.repo,
tag_name: `${{ steps.tag.outputs.new_tag }}`,
name: `${{ steps.tag.outputs.new_tag }}`,
body: `${{ steps.changelog.outputs.changelog }}`,
});
```