Skip to content

Handling case insensitive exclude labels #737

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
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
- Can we exclude closed Requests [\#632](https://github.com/github-changelog-generator/github-changelog-generator/issues/632)
- Version in master branch hangs on MacOS [\#629](https://github.com/github-changelog-generator/github-changelog-generator/issues/629)
- Some PRs logged for the wrong releases [\#617](https://github.com/github-changelog-generator/github-changelog-generator/issues/617)
- Is there way to list referenced but not closed issues? [\#609](https://github.com/github-changelog-generator/github-changelog-generator/issues/609)
- since\_tag with unreleased tag unexpected behavior [\#604](https://github.com/github-changelog-generator/github-changelog-generator/issues/604)
- Generator doesn't work when I run the command presented in the docs [\#599](https://github.com/github-changelog-generator/github-changelog-generator/issues/599)
- Move repo to organisation [\#595](https://github.com/github-changelog-generator/github-changelog-generator/issues/595)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ class Generator
def exclude_issues_by_labels(issues)
return issues if !options[:exclude_labels] || options[:exclude_labels].empty?

exclude_labels = options[:exclude_labels].map(&:downcase)
issues.reject do |issue|
labels = issue["labels"].map { |l| l["name"] }
(labels & options[:exclude_labels]).any?
issue_labels = issue["labels"].map { |label| label["name"].downcase }
(issue_labels & exclude_labels).any?
end
end

Expand Down