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
883 stars 324 forks source link

Can I group the issues by specific label instead of the first label? #227

Open liangweihua-rock opened 4 years ago

liangweihua-rock commented 4 years ago

I got following error when group by specific label, can I do it by any option? gren's version is 0.17.0

gren release --group-by "Type:Bug" --tags=v0.1.0..v0.2.0 --override

🤖  - Generate release notes:
===================================
✔ Releases found: 2
✔ Tags found: v0.2.0, v0.1.0
✔ Issues found: 63
The option for groupBy is invalid, please check the documentation
alexcanessa commented 4 years ago

Hello @liangweihua-rock groupBy is either label or an Object (which means you need the config file) see https://github-tools.github.io/github-release-notes/options.html#group-by-1

liangweihua-rock commented 4 years ago

Hello @liangweihua-rock groupBy is either label or an Object (which means you need the config file) see https://github-tools.github.io/github-release-notes/options.html#group-by-1

Thanks a lot for your reply, I've tried the config file in the format of https://github-tools.github.io/github-release-notes/options.html#group-by-1, seems the issues is grouped by Label1 OR label2, i.e I want to group the issue with label1 AND label2 in one group, but seems all the issues with lable1 OR label2 are grouped in. I'll try it further.

alexcanessa commented 4 years ago

@liangweihua-rock oh I see what you mean.

We don't have any logic for that atm. Have you thought of a possible API for it?

liangweihua-rock commented 4 years ago

@liangweihua-rock oh I see what you mean.

We don't have any logic for that atm. Have you thought of a possible API for it?

Yes...I hope there would be an API to group the label1 AND label2, but I am not familar with javascript, I am in learning process.

alexcanessa commented 4 years ago

@liangweihua-rock I think we could use Arrays for that.

Something like this would group under the group Enhancements, the issues that have (enhancement AND new feature) OR internal.

{
    "groupBy": {
        "Enhancements:": [["enhancement", "new feature"], "internal"]
    }
}