Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: Collapsible categories #1093

Closed
robbinjanssen opened this issue Mar 3, 2022 · 12 comments
Closed

feature: Collapsible categories #1093

robbinjanssen opened this issue Mar 3, 2022 · 12 comments

Comments

@robbinjanssen
Copy link
Contributor

In some releases our "dependencies" category is huge because of many JS dependencies. It would be nice if there would be an option to make some categories collapsed by default.

Example config:

categories:
  - title: "New features"
    labels:
      - "new-feature"
  - title: "Dependency updates"
    collapsed: true
    labels:
      - "dependencies"

Example output:

What’s changed

New features

  • pr1 Added a collapsed boolean to category config

Dependency updates

4 changes
  • pr2 Bump dep1 from 6.17.9 to 6.18.0
  • pr3 Bump dep1 from 6.18.0 to 6.18.1
  • pr4 Bump dep1 from 6.18.1 to 6.18.2
  • pr5 Bump dep1 from 6.18.2 to 6.18.3

Is this something you would be willing to accept as an PR?

@jetersen
Copy link
Member

jetersen commented Mar 3, 2022

Great suggestion!

That would be a good first PR :)

Perhaps it would be good to say anything greater than 3 is collapsed if collapsed is true? I do not believe you need it to be collapsed for only 3 items or less.

@robbinjanssen
Copy link
Contributor Author

robbinjanssen commented Mar 4, 2022

I like your idea, if we take it even further we can make it configurable and set the default to > 3?

Any suggestion for the name of the configuration?

categories:
  - title: "Dependency updates"
    collapsed: true
    collapse_at: 3
    labels:
      - "dependencies"

edit: maybe we should start with your idea, let me wrap up my PR

@robbinjanssen
Copy link
Contributor Author

@jetersen
Copy link
Member

https://cs.github.com/?scopeName=All+repos&scope=&q=collapse-after+path%3A.github%2Frelease-drafter.yml nice to see active usage in 9 places already 😄

@robbinjanssen
Copy link
Contributor Author

I first noticed it being used in home-assistant/supervisor which I use (and am a big fan of) myself! Pretty cool 😄 We use it in all our (private) repo's.

I've got another feature in mind, but not sure about it yet.

I would like to merge these:

  • #3010 Bump @babel/core from 7.17.5 to 7.17.6 @dependabot
  • #3020 Bump @babel/core from 7.17.6 to 7.17.7 @dependabot
  • #3030 Bump @babel/core from 7.17.5 to 7.17.8 @dependabot

into:

  • #3010,#3020,#3030 bump @babel/core from 7.17.5 to 7.17.8 @dependabot

Do you see any use for this @jetersen?

@jetersen
Copy link
Member

Definitely but please keep renovate in mind

@robbinjanssen
Copy link
Contributor Author

Haven't heard of renovate before, will look into it 👍

@jetersen
Copy link
Member

jetersen commented Mar 22, 2022

Here are some example from renovate.

  • Update Helm release argo-cd to v3.33.8 @renovate
  • Update Helm release argo-cd to v3.35.4 @renovate
  • Update Helm release argo-cd to v4 @renovate

I guess it does not provide the from so perhaps it does not make sense.

@robbinjanssen
Copy link
Contributor Author

I see, if I understand correctly renovate has the option to make a big PR with a bunch of dependency updates, whereas dependabot makes separate PRs. One big PR (depending on the title) would be a bit meaningless in the release notes, whereas all dependabot PRs can feel a bit overwhelming.

I'm not sure if this is something we should implement, but if we do the result would be something like below.

Pros: cleaner release notes
Cons: implementing a specific feature for a specific category, i see no other use cases for this.

collapse-after: 1

40 changes
  • [#2032] Bump @babel/core from 7.17.5 to 7.17.7 @dependabot
  • [#2048] Bump @babel/core from 7.17.7 to 7.17.8 @dependabot
  • [#2033] Bump @babel/register from 7.17.0 to 7.17.7 @dependabot
  • [#2034] Bump @babel/runtime from 7.17.2 to 7.17.7 @dependabot
  • [#2047] Bump @babel/runtime from 7.17.7 to 7.17.8 @dependabot
  • [#2035] Bump @fortawesome/fontawesome-svg-core from 1.3.0 to 6.1.0 @dependabot
  • [#2036] Bump @fortawesome/free-solid-svg-icons from 6.0.0 to 6.1.0 @dependabot
  • [#2044] Bump @fortawesome/react-fontawesome from 0.1.17 to 0.1.18 @dependabot
  • [#1993] Bump @sentry/browser from 6.17.9 to 6.18.0 @dependabot
  • [#2002] Bump @sentry/browser from 6.18.0 to 6.18.1 @dependabot
  • [#2021] Bump @sentry/browser from 6.18.1 to 6.18.2 @dependabot
  • [#2051] Bump @sentry/browser from 6.18.2 to 6.19.1 @dependabot
  • [#1994] Bump @sentry/node from 6.17.9 to 6.18.0 @dependabot
  • [#2004] Bump @sentry/node from 6.18.0 to 6.18.1 @dependabot
  • [#2019] Bump @sentry/node from 6.18.1 to 6.18.2 @dependabot
  • [#2052] Bump @sentry/node from 6.18.2 to 6.19.1 @dependabot
  • [#2000] Bump @sentry/webpack-plugin from 1.18.7 to 1.18.8 @dependabot
  • [#2007] Bump actions/checkout from 2 to 3 @dependabot
  • [#1995] Bump actions/setup-node from 2.5.1 to 3.0.0 @dependabot
  • [#2024] Bump axios from 0.26.0 to 0.26.1 @dependabot
  • [#1998] Bump babel-plugin-styled-components from 2.0.5 to 2.0.6 @dependabot
  • [#2031] Bump connect-redis from 6.1.1 to 6.1.2 @dependabot
  • [#2049] Bump connect-redis from 6.1.2 to 6.1.3 @dependabot
  • [#2017] Bump css-loader from 6.6.0 to 6.7.0 @dependabot
  • [#2018] Bump css-loader from 6.7.0 to 6.7.1 @dependabot
  • [#1999] Bump eslint from 8.9.0 to 8.10.0 @dependabot
  • [#2027] Bump eslint from 8.10.0 to 8.11.0 @dependabot
  • [#1996] Bump eslint-plugin-react from 7.28.0 to 7.29.2 @dependabot
  • [#2012] Bump eslint-plugin-react from 7.29.2 to 7.29.3 @dependabot
  • [#2026] Bump eslint-plugin-react from 7.29.3 to 7.29.4 @dependabot
  • [#2020] Bump inquirer from 8.2.0 to 8.2.1 @dependabot
  • [#2025] Bump knex from 1.0.3 to 1.0.4 @dependabot
  • [#2010] Bump mini-css-extract-plugin from 2.5.3 to 2.6.0 @dependabot
  • [#1997] Bump ml-matrix from 6.8.2 to 6.9.0 @dependabot
  • [#2005] Bump react-router from 6.2.1 to 6.2.2 @dependabot
  • [#2003] Bump react-router-dom from 6.2.1 to 6.2.2 @dependabot
  • [#2009] Bump react-scroll from 1.8.5 to 1.8.6 @dependabot
  • [#2028] Bump react-hook-form from 7.27.1 to 7.28.0 @dependabot
  • [#2046] Bump react-hook-form from 7.28.0 to 7.28.1 @dependabot
  • [#2011] Bump webpack from 5.69.1 to 5.70.0 @dependabot

collapse-after: 1, merge-similar: true

40 changes
  • [#2032],[#2048] Bump @babel/core from 7.17.5 to 7.17.8 @dependabot
  • [#2033] Bump @babel/register from 7.17.0 to 7.17.7 @dependabot
  • [#2034],[#2047] Bump @babel/runtime from 7.17.2 to 7.17.8 @dependabot
  • [#2035] Bump @fortawesome/fontawesome-svg-core from 1.3.0 to 6.1.0 @dependabot
  • [#2036] Bump @fortawesome/free-solid-svg-icons from 6.0.0 to 6.1.0 @dependabot
  • [#2044] Bump @fortawesome/react-fontawesome from 0.1.17 to 0.1.18 @dependabot
  • [#1993],[#2002],[#2021],[#2051] Bump @sentry/browser from 6.17.9 to 6.19.1 @dependabot
  • [#1994],[#2004],[#2019],[#2052] Bump @sentry/node from 6.17.9 to 6.19.1 @dependabot
  • [#2000] Bump @sentry/webpack-plugin from 1.18.7 to 1.18.8 @dependabot
  • [#2007] Bump actions/checkout from 2 to 3 @dependabot
  • [#1995] Bump actions/setup-node from 2.5.1 to 3.0.0 @dependabot
  • [#2024] Bump axios from 0.26.0 to 0.26.1 @dependabot
  • [#1998] Bump babel-plugin-styled-components from 2.0.5 to 2.0.6 @dependabot
  • [#2031],[#2049] Bump connect-redis from 6.1.1 to 6.1.3 @dependabot
  • [#2017],[#2018] Bump css-loader from 6.6.0 to 6.7.1 @dependabot
  • [#1999],[#2027] Bump eslint from 8.9.0 to 8.11.0 @dependabot
  • [#1996][#2012],[#2026] Bump eslint-plugin-react from 7.28.0 to 7.29.4 @dependabot
  • [#2020] Bump inquirer from 8.2.0 to 8.2.1 @dependabot
  • [#2025] Bump knex from 1.0.3 to 1.0.4 @dependabot
  • [#2010] Bump mini-css-extract-plugin from 2.5.3 to 2.6.0 @dependabot
  • [#1997] Bump ml-matrix from 6.8.2 to 6.9.0 @dependabot
  • [#2005] Bump react-router from 6.2.1 to 6.2.2 @dependabot
  • [#2003] Bump react-router-dom from 6.2.1 to 6.2.2 @dependabot
  • [#2009] Bump react-scroll from 1.8.5 to 1.8.6 @dependabot
  • [#2028],[#2046] Bump react-hook-form from 7.27.1 to 7.28.1 @dependabot
  • [#2011] Bump webpack from 5.69.1 to 5.70.0 @dependabot

@jetersen
Copy link
Member

Lets do for just dependabot than, it definitely cleans up the release notes.

@jetersen
Copy link
Member

@robbinjanssen see #706

@robbinjanssen
Copy link
Contributor Author

last but not least (and then let's stop harassing this issue 😂 ), one more idea.

We have a global definition of sort-by and sort-direction, I would like to suggest an override possibility per category.

For example:

name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'
change-template: '- [#$NUMBER] $TITLE [@$AUTHOR](https://github.com/$AUTHOR)'
sort-by: merged_at
sort-direction: ascending

categories:
  - title: "✨ New features"
    labels:
      - "new-feature"
  - title: "⬆️  Dependency updates"
    collapse-after: 1
    sort-by: title
    labels:
      - "dependencies"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants