Skip to content

Commit 1232f33

Browse files
committed
Merge branch 'release/1.3.10'
2 parents bf27187 + 3cc6418 commit 1232f33

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

lib/github_changelog_generator.rb

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ def initialize
3636

3737
if @options[:pulls]
3838
@pull_requests = self.get_filtered_pull_requests
39-
self.fetch_merged_at_pull_requests
4039
else
4140
@pull_requests = []
4241
end
@@ -138,12 +137,12 @@ def fetch_merged_at_pull_requests
138137

139138
def get_filtered_pull_requests
140139

141-
pull_requests = @pull_requests
142-
filtered_pull_requests = pull_requests
140+
self.fetch_merged_at_pull_requests
143141

142+
filtered_pull_requests = @pull_requests.select {|pr| pr[:merged_at] != nil }
144143

145144
unless @options[:include_labels].nil?
146-
filtered_pull_requests = pull_requests.select { |issue|
145+
filtered_pull_requests = @pull_requests.select { |issue|
147146
#add all labels from @options[:incluse_labels] array
148147
(issue.labels.map { |label| label.name } & @options[:include_labels]).any?
149148
}
@@ -157,7 +156,7 @@ def get_filtered_pull_requests
157156
end
158157

159158
if @options[:add_issues_wo_labels]
160-
issues_wo_labels = pull_requests.select {
159+
issues_wo_labels = @pull_requests.select {
161160
# add issues without any labels
162161
|issue| !issue.labels.map { |label| label.name }.any?
163162
}
@@ -332,7 +331,7 @@ def generate_log_between_tags(older_tag, newer_tag)
332331

333332
if filtered_issues.empty? && filtered_pull_requests.empty? && newer_tag.nil?
334333
# do not generate empty unreleased section
335-
return nil
334+
return ''
336335
end
337336

338337
self.create_log(filtered_pull_requests, filtered_issues, newer_tag, older_tag_name)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module GitHubChangelogGenerator
2-
VERSION = '1.3.9'
2+
VERSION = '1.3.10'
33
end

0 commit comments

Comments
 (0)