From 7c101747bab527eb64d99bc6c0e2053410717d20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Gro=C3=9Fe?= Date: Fri, 17 Apr 2020 19:13:07 +0200 Subject: [PATCH] add option --[no-]issues-of-open-milestones --- .../generator/generator_processor.rb | 3 +++ lib/github_changelog_generator/options.rb | 1 + lib/github_changelog_generator/parser.rb | 4 ++++ man/git-generate-changelog.1 | 12 +++++++++--- man/git-generate-changelog.1.html | 6 +++++- man/git-generate-changelog.md | 4 ++++ 6 files changed, 26 insertions(+), 4 deletions(-) diff --git a/lib/github_changelog_generator/generator/generator_processor.rb b/lib/github_changelog_generator/generator/generator_processor.rb index 09d7bab7c..35622c8d5 100644 --- a/lib/github_changelog_generator/generator/generator_processor.rb +++ b/lib/github_changelog_generator/generator/generator_processor.rb @@ -69,6 +69,9 @@ def remove_issues_in_milestones(filtered_issues) # leave issues without milestones if issue["milestone"].nil? true + # remove issues of open milestones if option is set + elsif issue["milestone"]["state"] == "open" + @options[:issues_of_open_milestones] else # check, that this milestone in tag list: @filtered_tags.find { |tag| tag["name"] == issue["milestone"]["title"] }.nil? diff --git a/lib/github_changelog_generator/options.rb b/lib/github_changelog_generator/options.rb index 9be12de6a..319842771 100644 --- a/lib/github_changelog_generator/options.rb +++ b/lib/github_changelog_generator/options.rb @@ -37,6 +37,7 @@ class Options < SimpleDelegator exclude_tags exclude_tags_regex filter_issues_by_milestone + issues_of_open_milestones frontmatter future_release github_endpoint diff --git a/lib/github_changelog_generator/parser.rb b/lib/github_changelog_generator/parser.rb index 49db1da08..fec7a2f7e 100755 --- a/lib/github_changelog_generator/parser.rb +++ b/lib/github_changelog_generator/parser.rb @@ -109,6 +109,9 @@ def self.setup_parser(options) opts.on("--[no-]filter-by-milestone", "Use milestone to detect when issue was resolved. Default is true.") do |last| options[:filter_issues_by_milestone] = last end + opts.on("--[no-]issues-of-open-milestones", "Include issues of open milestones. Default is true.") do |v| + options[:issues_of_open_milestones] = v + end opts.on("--[no-]author", "Add author of pull request at the end. Default is true.") do |author| options[:author] = author end @@ -230,6 +233,7 @@ def self.default_options add_pr_wo_labels: true, pulls: true, filter_issues_by_milestone: true, + issues_of_open_milestones: true, author: true, unreleased: true, unreleased_label: "Unreleased", diff --git a/man/git-generate-changelog.1 b/man/git-generate-changelog.1 index 99508ee74..879beef84 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" "April 2020" "" "" . .SH "NAME" \fBgit\-generate\-changelog\fR \- Generate changelog from GitHub @@ -157,6 +157,12 @@ Include pull\-requests in changelog\. Default is true\. Use milestone to detect when issue was resolved\. Default is true\. . .P +\-\-[no\-]issues\-of\-open\-milestones +. +.P +Include issues of open milestones\. Default is true\. +. +.P \-\-[no\-]author . .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..5fc787228 100644 --- a/man/git-generate-changelog.1.html +++ b/man/git-generate-changelog.1.html @@ -181,6 +181,10 @@

OPTIONS

Use milestone to detect when issue was resolved. Default is true.

+

--[no-]issues-of-open-milestones

+ +

Include issues of open milestones. Default is true.

+

--[no-]author

Add author of pull request at the end. Default is true.

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

SEE ALSO

  1. -
  2. May 2018
  3. +
  4. April 2020
  5. git-generate-changelog(1)
diff --git a/man/git-generate-changelog.md b/man/git-generate-changelog.md index 8f8ac7f35..16933191a 100644 --- a/man/git-generate-changelog.md +++ b/man/git-generate-changelog.md @@ -107,6 +107,10 @@ Automatically generate changelog from your tags, issues, labels and pull request Use milestone to detect when issue was resolved. Default is true. + --[no-]issues-of-open-milestones + + Include issues of open milestones. Default is true. + --[no-]author Add author of pull request at the end. Default is true. pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy