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

Request: Generate GroupBy Object Array items in order as listed #273

Open samkatakouzinos opened 4 years ago

samkatakouzinos commented 4 years ago

REQUEST: I would like Object Array items generated the order they are listed.

I use Pull Requests to create releases and changelogs.

I understand that currently;

Below is my configuration. For groupBy "Database" Object, I'd like "vehicle" items then "maintain" items generated in the order as listed. Instead I always get "maintain" first because of alphabet.

module.exports = {
    "dataSource": "prs",
    "ignoreIssuesWith": [
        "wontfix",
        "duplicate"
    ],
    "prefix": "",
    "onlyMilestones": false,
    "groupBy": {
        "Housekeeping": ["internal"], 
        "Database": ["vehicle", "maintain"],
        "Enhancements": ["enhancement"],
        "Bug Fixes": ["bug"],
        "null": ["null"]
    },
    "template": {
        commit: ({ message, url, author, name }) => `- [${message}](${url}) - ${author ? `@${author}` : name}`,
        issue: "- {{labels}} {{name}} [{{text}}]({{url}})",
        label: "[**{{label}}**]",
        noLabel: "closed",
        group: "\n#### {{heading}}\n",
        changelogTitle: "# Changelog\n\n",
        release: "## {{release}} ({{date}})\n{{body}}",
        releaseSeparator: "\n---\n\n"
    },
    "changelogFilename": "CHANGELOG.md"
}