From 37381731bc4bb0a120610ae4e89b3a25474a562a Mon Sep 17 00:00:00 2001 From: Dlani Mendes Date: Tue, 30 Jun 2020 19:16:56 -0300 Subject: [PATCH 1/3] :bug: (ParseOptionsFile): Added some options to Irregular Options --- lib/github_changelog_generator/parser_file.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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, From 9d76faa976fcc34188d0af233db3db730e9d103d Mon Sep 17 00:00:00 2001 From: Dlani Mendes Date: Tue, 11 Aug 2020 15:09:16 -0300 Subject: [PATCH 2/3] :sparkles: (AppendExcluded): Append excluded issues in nex release --- lib/github_changelog_generator/generator/generator_tags.rb | 2 +- lib/github_changelog_generator/options.rb | 1 + lib/github_changelog_generator/parser.rb | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) 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 9be12de6a..25f57ebcd 100644 --- a/lib/github_changelog_generator/options.rb +++ b/lib/github_changelog_generator/options.rb @@ -72,6 +72,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 49db1da08..9cacce75d 100755 --- a/lib/github_changelog_generator/parser.rb +++ b/lib/github_changelog_generator/parser.rb @@ -163,6 +163,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 @@ -234,6 +237,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"], From 1e4c77787a99fe9071f5b4e0a4aff2e1de71dea0 Mon Sep 17 00:00:00 2001 From: Dlani Mendes Date: Fri, 14 Aug 2020 17:11:45 -0300 Subject: [PATCH 3/3] :bulb: (man): Doc option in man page --- man/git-generate-changelog.1 | 12 +++++++++--- man/git-generate-changelog.1.html | 6 +++++- man/git-generate-changelog.md | 4 ++++ 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/man/git-generate-changelog.1 b/man/git-generate-changelog.1 index 99508ee74..6be814a8e 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 2018" "" "" +.TH "GIT\-GENERATE\-CHANGELOG" "1" "August 2020" "" "" . .SH "NAME" \fBgit\-generate\-changelog\fR \- Generate changelog from GitHub @@ -259,6 +259,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 @@ -375,7 +381,7 @@ GitHub pull requests that have been merged whose merge commit SHA has been modif Written by Petr Korolev sky4winder@gmail\.com . .SH "REPORTING BUGS" -<\fIhttps://github\.com/github-changelog-generator/github\-changelog\-generator/issues\fR> +<\fIhttps://github\.com/github\-changelog\-generator/github\-changelog\-generator/issues\fR> . .SH "SEE ALSO" -<\fIhttps://github\.com/github-changelog-generator/github\-changelog\-generator/\fR> +<\fIhttps://github\.com/github\-changelog\-generator/github\-changelog\-generator/\fR> diff --git a/man/git-generate-changelog.1.html b/man/git-generate-changelog.1.html index 91ce5d818..23c869654 100644 --- a/man/git-generate-changelog.1.html +++ b/man/git-generate-changelog.1.html @@ -249,6 +249,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,}".

@@ -342,7 +346,7 @@

SEE ALSO

  1. -
  2. May 2018
  3. +
  4. August 2020
  5. git-generate-changelog(1)
diff --git a/man/git-generate-changelog.md b/man/git-generate-changelog.md index 8f8ac7f35..13991a04d 100644 --- a/man/git-generate-changelog.md +++ b/man/git-generate-changelog.md @@ -175,6 +175,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,}".