Skip to content

Append issues omitted in next accepted release (by rules) #889

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/github_changelog_generator/generator/generator_tags.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
1 change: 1 addition & 0 deletions lib/github_changelog_generator/options.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ class Options < SimpleDelegator
user
usernames_as_github_logins
verbose
append_excluded
]

# @param values [Hash]
Expand Down
4 changes: 4 additions & 0 deletions lib/github_changelog_generator/parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"],
Expand Down
7 changes: 5 additions & 2 deletions lib/github_changelog_generator/parser_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
8 changes: 7 additions & 1 deletion man/git-generate-changelog.1
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion man/git-generate-changelog.1.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions man/git-generate-changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,}".
Expand Down