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 e790807e6..c71d4f18c 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 1135fdaf8..784cc43d5 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 @@ -233,6 +236,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 6bb705659..6e8bc9c25 100644 --- a/man/git-generate-changelog.1 +++ b/man/git-generate-changelog.1 @@ -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 diff --git a/man/git-generate-changelog.1.html b/man/git-generate-changelog.1.html index a0f78d14c..0f64784c4 100644 --- a/man/git-generate-changelog.1.html +++ b/man/git-generate-changelog.1.html @@ -181,6 +181,10 @@
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.
diff --git a/man/git-generate-changelog.md b/man/git-generate-changelog.md index afc183b11..b59c7a0a2 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.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: