Skip to content

Latest commit

 

History

History

configuration

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Configuration

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.

Configuration file

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:

Summary

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

TOKEN

Default value GITHUB_TOKEN

Authorization token. This will allow rng to access your repo!

token: USER_TOKEN

REPO

Default value GITHUB_REPOSITORY

Environment variable with repository name with user/repo format.

repo: CUSTOM_REPO
// env file
CUSTOM_REPO: user/repo

NAME

Default value RELEASE-NOTES

Output file name.

name: RELASE-NOTES-DEMO

OUT

Default value ''

Base path where RELEASE-NOTES will be generated. It must exists.

out: '.' # creates release-notes folder in root

SPLIT

Default value false

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

Default value is:closed

Filter applied on pull request query.

Default value looks for closed Pull Requests.

filter: "is:open" # looks for open PRs

SNAPSHOT

Default value false

Generates snapshot release notes using Pull Request since latest release.

snapshot: true # RELEASE-NOTES for unpublished release

LABELS

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.

Label object

Default labels configuration.

labels:
  include: release-note
  ignore: in-release-note
  end: in-release-note

IGNORE TAG

Default value <!--release-notes-ignore-->

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

Default value RELEASE NOTES

Title used in output markdown

title: RELEASE NOTES DEMO

HEADER

Defualt value null

Header above markdown

hader: |
    import { Meta } from 'third-party';

    <Meta title="test"/>

FORMAT

Default value .md

File format

format: '.stories.mdx'

DECORATION

Default value Decoration object

Icon decoration for each issue type.

Decoration object

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

ORDER

Default value ['release', 'refactor', 'enhancement', 'bug', 'style', 'documentation']

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 

PREVIEW

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.

Preview object

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:'

PUBLISH

Default value false

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

Default value main

Branch where output will be updloaded

branch: develop

MESSAGE

Default value chore: update RELEASE-NOTES

Commit message

message: "chore: update RELEASE-NOTES [skip ci]"

WEBHOOKS

Default value {}

List of webhooks to execute.

TEAMS

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!

Microsoft Docs for activity cards

Notification

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

Default configuration

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