github-tools / github-release-notes

Node module to create a release or a changelog from a tag and uses issues or commits to creating the release notes.
https://github-tools.github.io/github-release-notes/
GNU General Public License v3.0
880 stars 325 forks source link

How to "groupBy" PRs that don't have the labels at the end? #272

Open tonglil opened 4 years ago

tonglil commented 4 years ago

I don't want to specify every label, and some PRs don't need to have labels but should still be included in the release.

There doesn't seem to be a way to do that currently.

alexcanessa commented 4 years ago

You're right! I forgot to document it 😅

There are two things that you can do:

  1. Using the option groupBy with value "label". That will group all the PRs with the same label under the same title, and you can add the option noLabel (default "closed") for the ones that don't have a label. e.g.
    {
    "groupBy": "label",
    "noLabel": "done"
  2. Using the option groupBy with value { [groupName: string]: Array<string> }. To group all the other ones - including the ones with no label - use "...". e.g.
    {
    "groupBy": {
    "Bug fixes": ["bug", "fix"],
    "Others": ["..."]

Hope that's clear and I'll add it to the docs