Relase notes generator can be configured in a variety of ways. You can pass options directly to rng using cli commands, or create a configuration file in your <root>
folder.
We'll search for a config. file named .releasenotesrc
by default, you can set a different name using -c
CLI command.
We support .yml
and .json
formats with these options:
Options | Default | Description |
---|---|---|
token | GITHUB_TOKEN |
Authorization token. This will allow rng to access your repo! |
repo | GITHUB_REPOSITORY |
Environment variable with repository name with user/repo format |
name | RELEASE-NOTES |
Output file name |
out | '.' |
Base path where RELEASE-NOTES will be generated |
split | false |
If true one file will be generated per iteration, and will be stored under a release_notes folder in out directory |
filter | is:closed |
Filter applied on pull request query |
snapshot | false |
Generates snapshot release notes using Pull Request since latest release |
labels | [ 'release-note' ] |
Only PRs with these labels will be used in generation process |
ignoreTag | <!--release-notes-ignore--> |
Text inside this comment tag will be ignored in RELEASE NOTES |
title | RELEASE NOTES |
Title used in output markdown |
header | null |
Text to be used on header section over release notes. Useful for mdx files |
format | .md |
File format used in save |
decoration | Decoration object | Icon decoration for each issue type |
order | ['release', 'refactor', 'enhancement', 'bug', 'style', 'documentation'] |
Order of issues in release notes |
preview | Preview object | Customize preview comment |
publish | false |
If true the output file will be commited to repo |
branch | main |
Branch where output will be uploaded |
message | chore: update RELEASE-NOTES |
Commit message |
webhooks | {} |
List of webhooks to execute |
notification | Notification customization | Object that allows you to customize your webhook notification |
Authorization token. This will allow rng to access your repo!
token: USER_TOKEN
Environment variable with repository name with user/repo
format.
repo: CUSTOM_REPO
// env file
CUSTOM_REPO: user/repo
Output file name.
name: RELASE-NOTES-DEMO
Base path where RELEASE-NOTES
will be generated. It must exists.
out: '.' # creates release-notes folder in root
If true
one file will be generated per iteration, and will be stored under a release-notes
folder in out
directory.
split: true
out: '.'
Filter applied on pull request query.
Default value looks for closed Pull Requests.
filter: "is:open" # looks for open PRs
Generates snapshot release notes using Pull Request since latest release.
snapshot: true # RELEASE-NOTES for unpublished release
Default value Label object
Configuration object to set wich labels will be included, ignored and used to tag parsed Pull Requests
- include: Only Pull Requests with these labels will be included in release notes.
- ignore: Pull Requests with these label will be ignored.
- end: Once release notes are generated, Pull Requests will be tagged with these labels.
Default labels configuration.
labels:
include: release-note
ignore: in-release-note
end: in-release-note
You can surround with this comment tag any text you want to ignore in release notes
## Feat
Text in release notes
<!--release-notes--ignore-->
Text ignore in release notes
<!--release-notes-ignore-->
You can customize this tag in your .releasenotesrc.yml
ignoreTag: '<!--custom-ignore-tag-->'
Title used in output markdown
title: RELEASE NOTES DEMO
Header above markdown
hader: |
import { Meta } from 'third-party';
<Meta title="test"/>
File format
format: '.stories.mdx'
Default value Decoration object
Icon decoration for each issue type.
key: value
object.
- key: issue type
- value: decoration string
// default value
decoration:
enhancement: ':zap: '
bug: ':bug: '
refactor: ':abacus: '
release: ':rocket: '
style: ':nailcare: '
documentation: ':book: '
Markdown for a pr tagged with enhancement
label:
## :zap: Issue title
Customize how your issues will be sort in release notes, as usually you'll need to group issues of one kind all together, and give some preference of ones among others, i.e enhancement > bug
order:
- release
- refactor
- enhancement
- bug
- style
- documentation
Defaul value Preview object
Customize header
and footer
of release note preview comment.
Preview comment will be published only if issue
attribute is informed.
You can configure issue
dinamically using --issue
CLI command.
Default preview configuration.
preview:
issue: undefined # if informed the generation script will try to publish a comment in `issue`
header: '### :book::rocket: RELEASE NOTES Preview'
footer: 'Generated with [RNG](https://github.com/adrianiy/release-notes-generator) bot :robot:'
If true
the output file will be commited to repo.
GITHUB_TOKEN should have enough permissions if you are trying to update a protected branch!
publish: true
Branch where output will be updloaded
branch: develop
Commit message
message: "chore: update RELEASE-NOTES [skip ci]"
List of webhooks to execute.
Notificate your partners via TEAMS webhook integration!.
webhooks:
teams:
url: # <your webhook url>
activityTitle: "Release notification!"
activitySubtitle: "Generated with [@adrian.insua/release-notes-generator](https://github.com/adrianiy/release-notes-generator)"
activityImage: "<image url>"
actions:
- "@type": "OpenUri"
name: "View Changes"
targets:
- os: default
uri: "https://github.com/inditex/adrianiy/blob/develop/CHANGELOG.md"
Only url parameter is mandatory!
Default value Configuration object
You can customize your webhook notification using notification.style
attribute.
This is an object where each key is a htm tag like <div>
with a style object as value.
By default we modify some classes to make notification more readable, we encourage yo to use this yml example as a base for your customizations
notification:
style:
h1:
font-size: 3rem
margin-top: 2rem
h2:
font-size: 2rem
margin-top: 3rem
h3:
font-size: 1.8rem
margin: 2rem 0
h6:
font-size: .9em
opacity: .7
p:
font-size: 1.4rem
li:
margin-bottom: 8px
pre:
margin-bottom: .7rem