Skip to content

Add support for custom sections #316

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

Closed
SandroMachado opened this issue Jan 8, 2016 · 21 comments · Fixed by #1026
Closed

Add support for custom sections #316

SandroMachado opened this issue Jan 8, 2016 · 21 comments · Fixed by #1026
Labels
feature-request hacktoberfest Enjoy flashmob: https://hacktoberfest.digitalocean.com. Get a swag! help wanted

Comments

@SandroMachado
Copy link

Currently the project groups the merged pull-requests, the issues with the label bug and the issues with the label enhancement. All the issues with other labels are grouped at the same block.

Is it possible to add more labels to group the issues with that labels?

Thanks for your work.

@skywinder
Copy link
Member

No, there is no such option yet. But it's a good feature.

@skywinder skywinder changed the title Add support for custom labels Add support for custom sections Jan 8, 2016
@ruipenso
Copy link

ruipenso commented Jan 8, 2016

👍

@olleolleolle
Copy link
Collaborator

(In order to know more about the feature, here's a guess about how it could be used. None of this is more than a guess, mind you. Especially how to express the setting - it must be expressable in a command-line invocation, too.)

Randy the Rake-User wants to group cool new stuff under a release notes Section named "Goodies in this release", which lists any merged pull-request which has the label goodies or the label wonderful.

He introduces this new section by amending his Rake task definition:

config.custom_sections << ['Goodies in this release', %w(goodies wonderful)]

@skywinder
Copy link
Member

@olleolleolle 👍

or by command line smth like:
--custom_sections 'Goodies in this release', goodies, wonderful

But how to make ability to add several custom sections?
Obviously, we have to create internal Dictionary [String:Array]
like

{
"Bugs" : [bug, Bug, another Bug Label],
"Features" : [feature, improvement],
...
}

Do you know convenient way to add it via CLI options?

@ruipenso
Copy link

@skywinder Any news? :)

@skywinder
Copy link
Member

@ruipenso didn't work on that feature yet.

@aerosol
Copy link

aerosol commented Mar 1, 2016

Just came here to give big ups 💯. Being able to group the changes per custom labels, e.g. "API" and "Front-End" would be totally awesome.

The CLI interface could look like:

--custom-group-{name}-labels=foo,bar,baz

e.g.

--custom-group-api-labels=api --custom-group-frontend-labels=web,javascript

This way you could easily (sorry if I'm underestimating this - I'm not fluent with ruby at all), build the hierarchy - first build the custom groups, then within those, build the log of bugs, enhancements etc.

@skywinder
Copy link
Member

@aerosol how to solve several groups in that case?

@aerosol
Copy link

aerosol commented Mar 2, 2016

@skywinder could you give an example?

@nicwaller
Copy link

I would also appreciate this feature! In accordance with Semantic Versioning I make a point of highlighting changes that break backward compatibility. It would be great if I could configure the changelog generator to include a section for breaking changes. Like this.

--section 'Breaking Changes #breaking' --section 'Deprecated #deprecated'

As you can see, I've also proposed an alternate command line syntax for specifying sections. I like the idea of being able to specify the --section option more than once. I've seen precedent for this in other tools, but can't cite an example right now. I've also suggested using a hashtag syntax to identify relevant labels, but that has two problems. First, it is messy and unintuitive. Second, it doesn't support labels with spaces in their names.

@aih
Copy link
Contributor

aih commented Sep 22, 2016

An alternate, or additional feature would be to add the label next to the commit message. Something like:

@crtrott
Copy link

crtrott commented Oct 26, 2016

Just wanted to add that we'd like to see this feature as well. But its a great tool already.

@stratosgear
Copy link

As @nicwaller mentioned above, the ability to hilight breaking changes in this newer release, is sorely needed in my use case.

Regarding passing multiple "sections", again as nicwaller suggests you could use repeating --section options. Don't know the state of command line parsing libraries in Ruby, but several in Python allow you to easily implement that.

Great tool by the way... :)

@srizzling
Copy link

with regards to this. I would like to add a section that has some list of artifacts (AMIs) in my case attached to each release. Is there someway I can add that?

@skywinder
Copy link
Member

@srizzling Yep. It's a super cool and most required feature.

I'd be more than happy to merge a PR adding this feature, it seems like it would be useful for sure 👍

@ghost
Copy link

ghost commented Jan 22, 2020

I guess this is supported already by option configure-sections ?

@skywinder skywinder added in progress hacktoberfest Enjoy flashmob: https://hacktoberfest.digitalocean.com. Get a swag! labels Sep 26, 2020
@stephenpmurray
Copy link

stephenpmurray commented Feb 10, 2021

Can anyone confirm whether the add-sections and configure-sections options actually work at the moment, or whether this is a WIP feature?

@ghost
Copy link

ghost commented Feb 10, 2021

@stephenpmurray configure-sections works for us in our project

@stephenpmurray
Copy link

stephenpmurray commented Feb 10, 2021

@dusan-dragon Thanks for the quick reply. At the risk of hijacking this thread, do you have an example of this being used? I have added the following to .github_changelog_generator:

add-sections= { "name": "dependencies", "prefix": "**Dependency Changes**", "labels": [ "dependency", "Dependency" ]  }

But am recieving the following error:
entry.rb:75:in 'block in parse_sections' : no implicit conversion of String into Integer
An issue of JSON string parsing, perhaps?

@ghost
Copy link

ghost commented Feb 10, 2021

@stephenpmurray as I wrote I am not sure about add-section, instead we defined all sections via configure-sections

This works for us:

configure-sections={"summary": {"prefix": "**Update notes**", "body_only": true, "labels": ["release-summary"]}, "new_features": {"prefix": "**New features**","labels": ["enhancement"]},"deprecated": {"prefix": "**Deprecated**","labels": ["deprecated"]},"bug_fixes": {"prefix": "**Bug fixes**","labels": ["bug"]},"critical": {"prefix": "**Critical updates**","labels": ["critical"]},"breaking_changes": {"prefix": "**Breaking changes**","labels": ["breaking"]}}

@stephenpmurray
Copy link

@dusan-dragon Thanks for the help, that's working for me, and I can confirm that add-sections is working with the above format.

Would it be helpful if I open a PR adding an example to the README?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request hacktoberfest Enjoy flashmob: https://hacktoberfest.digitalocean.com. Get a swag! help wanted
Projects
None yet
Development

Successfully merging a pull request may close this issue.