diff --git a/lib/github_changelog_generator/generator/generator_tags.rb b/lib/github_changelog_generator/generator/generator_tags.rb index 3e0da72d5..096db814a 100644 --- a/lib/github_changelog_generator/generator/generator_tags.rb +++ b/lib/github_changelog_generator/generator/generator_tags.rb @@ -17,7 +17,7 @@ def fetch_and_filter_tags # Because we need to properly create compare links, we need a sorted list # of all filtered tags (including the excluded ones). We'll exclude those # tags from section headers inside the mapping function. - section_tags = get_filtered_tags(all_sorted_tags) + section_tags = options[:append_excluded] ? @filtered_tags : get_filtered_tags(all_sorted_tags) @tag_section_mapping = build_tag_section_mapping(section_tags, @filtered_tags) diff --git a/lib/github_changelog_generator/options.rb b/lib/github_changelog_generator/options.rb index c71d4f18c..82ec11375 100644 --- a/lib/github_changelog_generator/options.rb +++ b/lib/github_changelog_generator/options.rb @@ -74,6 +74,7 @@ class Options < SimpleDelegator user usernames_as_github_logins verbose + append_excluded ] # @param values [Hash] diff --git a/lib/github_changelog_generator/parser.rb b/lib/github_changelog_generator/parser.rb index ef89d0230..38fd64631 100755 --- a/lib/github_changelog_generator/parser.rb +++ b/lib/github_changelog_generator/parser.rb @@ -166,6 +166,9 @@ def self.setup_parser(options) opts.on("--exclude-tags-regex [REGEX]", "Apply a regular expression on tag names so that they can be excluded, for example: --exclude-tags-regex \".*\+\d{1,}\".") do |last| options[:exclude_tags_regex] = last end + opts.on("--[no-]append-excluded", "Append ommited issues from excluded-tags in a next release.") do |v| + options[:exclude_tags_regex] = v + end opts.on("--since-tag x", "Changelog will start after specified tag.") do |v| options[:since_tag] = v end @@ -241,6 +244,7 @@ def self.default_options unreleased: true, unreleased_label: "Unreleased", compare_link: true, + append_excluded: false, exclude_labels: ["duplicate", "question", "invalid", "wontfix", "Duplicate", "Question", "Invalid", "Wontfix", "Meta: Exclude From Changelog"], summary_labels: ["Release summary", "release-summary", "Summary", "summary"], breaking_labels: ["backwards-incompatible", "Backwards incompatible", "breaking"], diff --git a/lib/github_changelog_generator/parser_file.rb b/lib/github_changelog_generator/parser_file.rb index 61acf01b7..2bd464d90 100644 --- a/lib/github_changelog_generator/parser_file.rb +++ b/lib/github_changelog_generator/parser_file.rb @@ -92,10 +92,13 @@ def convert_value(value, option_name) bugs_label: :bug_prefix, enhancement_label: :enhancement_prefix, issues_label: :issue_prefix, - header_label: :header, - front_matter: :frontmatter, pr_label: :merge_prefix, breaking_label: :breaking_prefix, + deprecated_label: :deprecated_prefix, + removed_label: :removed_prefix, + security_label: :security_prefix, + header_label: :header, + front_matter: :frontmatter, issues_wo_labels: :add_issues_wo_labels, pr_wo_labels: :add_pr_wo_labels, pull_requests: :pulls, diff --git a/man/git-generate-changelog.1 b/man/git-generate-changelog.1 index 6e8bc9c25..f3ee34f3e 100644 --- a/man/git-generate-changelog.1 +++ b/man/git-generate-changelog.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "GIT\-GENERATE\-CHANGELOG" "1" "May 2020" "" "" +.TH "GIT\-GENERATE\-CHANGELOG" "1" "August 2020" "" "" . .SH "NAME" \fBgit\-generate\-changelog\fR \- Generate changelog from GitHub @@ -265,6 +265,12 @@ The specified labels will be shown in brackets next to each matching issue\. Use Changelog will exclude specified tags\. . .P +\-\-append\-excluded +. +.P +Append issues ommited in excluded\-tags +. +.P \-\-exclude\-tags\-regex [REGEX] . .P diff --git a/man/git-generate-changelog.1.html b/man/git-generate-changelog.1.html index 0f64784c4..18976bd58 100644 --- a/man/git-generate-changelog.1.html +++ b/man/git-generate-changelog.1.html @@ -253,6 +253,10 @@

OPTIONS

Changelog will exclude specified tags.

+

--append-excluded

+ +

Append issues ommited in excluded-tags

+

--exclude-tags-regex [REGEX]

Apply a regular expression on tag names so that they can be excluded, for example: --exclude-tags-regex ".*+\d{1,}".

@@ -350,7 +354,7 @@

SEE ALSO

  1. -
  2. May 2020
  3. +
  4. August 2020
  5. git-generate-changelog(1)
diff --git a/man/git-generate-changelog.md b/man/git-generate-changelog.md index b59c7a0a2..cf808ae72 100644 --- a/man/git-generate-changelog.md +++ b/man/git-generate-changelog.md @@ -179,6 +179,10 @@ Automatically generate changelog from your tags, issues, labels and pull request Changelog will exclude specified tags. + --append-excluded + + Append issues ommited in excluded-tags + --exclude-tags-regex [REGEX] Apply a regular expression on tag names so that they can be excluded, for example: --exclude-tags-regex ".*\+\d{1,}".