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

The CHANGELOG.md generation doesn't pull the issues from the milestone #269

Open TRomesh opened 4 years ago

TRomesh commented 4 years ago

I'm trying to automate the Release note generation. Here is my grenrc.js .

module.exports = {
  dataSource: "milestones",
  prefix: "",
  milestoneMatch: "Release {{tag_name}}",
  changelogFilename: "CHANGELOG.md",
  ignoreIssuesWith: ["duplicate", "wontfix", "invalid", "help wanted"],
  template: {
    commit: ({ message, url, author, name }) =>
      `- [${message}](${url}) - ${author ? `@${author}` : name}`,
    issue: "- {{labels}} {{name}} [{{text}}]({{url}})",
    label: "[**{{label}}**]",
    noLabel: "closed",
    changelogTitle: "# Changelog\n\n",
    release: "## {{release}} ({{date}})\n{{body}}",
    releaseSeparator: "\n---\n\n",
    group: function (placeholders) {
      var icon = "πŸ™ˆ";
      if (placeholders.heading == "Enhancements") {
        icon = "πŸš€";
      } else if (placeholders.heading == "Bug Fixes" || "Bugs") {
        icon = "πŸ›";
      } else if (placeholders.heading == "Documentation") {
        icon = "πŸ“š";
      } else if (placeholders.heading == "Technical Tasks") {
        icon = "βš™οΈ";
      }
      return "\n#### " + icon + " " + placeholders.heading + "\n";
    },
  },
  groupBy: {
    "Enhancements:": ["enhancement", "internal"],
    "Bug Fixes:": ["bug"],
  },
};

when i do a release it create a new release in my repo with commits but it doesn't fetch the issues, bugs or any other tags defined. I went through the documentation but i couldn't find on how to get that nice looking report like structure in release notes. I tried to generate the CHANGELOG.MD file using the gren changelog --generate --override but it doesn't fetch any issues or bugs. and this is how my release notes looks

image

Any reason why im not getting the issues on CHANGELOG.MD and inside the Release note.? Im new to gren and git release notes stuff.

alexcanessa commented 4 years ago

Hello @TRomesh, just to clarify, in your project you have a Milestone called Release v3.13 which contains the issues?

TRomesh commented 4 years ago

Hi @alexcanessa yes i have a milestone called Release v3.13 which contains issues with labels bugs,enhancements etc

alexcanessa commented 4 years ago

Ok, this might be related to a recent "fix" which seems to have broken things here and there. I'll keep you posted