This commit fix #69.
This commit is contained in:
parent
b0be9f8b06
commit
a4f93feb7d
|
@ -36,7 +36,6 @@ module GitHubChangelogGenerator
|
||||||
|
|
||||||
if @options[:pulls]
|
if @options[:pulls]
|
||||||
@pull_requests = self.get_filtered_pull_requests
|
@pull_requests = self.get_filtered_pull_requests
|
||||||
self.fetch_merged_at_pull_requests
|
|
||||||
else
|
else
|
||||||
@pull_requests = []
|
@pull_requests = []
|
||||||
end
|
end
|
||||||
|
@ -138,12 +137,12 @@ module GitHubChangelogGenerator
|
||||||
|
|
||||||
def get_filtered_pull_requests
|
def get_filtered_pull_requests
|
||||||
|
|
||||||
pull_requests = @pull_requests
|
self.fetch_merged_at_pull_requests
|
||||||
filtered_pull_requests = pull_requests
|
|
||||||
|
|
||||||
|
filtered_pull_requests = @pull_requests.select {|pr| pr[:merged_at] != nil }
|
||||||
|
|
||||||
unless @options[:include_labels].nil?
|
unless @options[:include_labels].nil?
|
||||||
filtered_pull_requests = pull_requests.select { |issue|
|
filtered_pull_requests = @pull_requests.select { |issue|
|
||||||
#add all labels from @options[:incluse_labels] array
|
#add all labels from @options[:incluse_labels] array
|
||||||
(issue.labels.map { |label| label.name } & @options[:include_labels]).any?
|
(issue.labels.map { |label| label.name } & @options[:include_labels]).any?
|
||||||
}
|
}
|
||||||
|
@ -157,7 +156,7 @@ module GitHubChangelogGenerator
|
||||||
end
|
end
|
||||||
|
|
||||||
if @options[:add_issues_wo_labels]
|
if @options[:add_issues_wo_labels]
|
||||||
issues_wo_labels = pull_requests.select {
|
issues_wo_labels = @pull_requests.select {
|
||||||
# add issues without any labels
|
# add issues without any labels
|
||||||
|issue| !issue.labels.map { |label| label.name }.any?
|
|issue| !issue.labels.map { |label| label.name }.any?
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user