Skip to content

Commit 81bc4f6

Browse files
committed
Support stable branch like 3.7/4.0
1 parent 17a094a commit 81bc4f6

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tool/release.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,13 @@ def scan_unreleased_pull_requests(ids)
323323
end
324324

325325
def unreleased_pr_ids
326-
commits = `git log --format=%h #{@previous_release_tag}..HEAD`.split("\n")
326+
commits = if @level == :minor_or_major
327+
`git log --format=%h #{@previous_release_tag}..HEAD`.split("\n")
328+
else
329+
`git log --format=%B #{@previous_release_tag}..HEAD`.split("\n").filter_map do |line|
330+
line[/\(cherry picked from commit ([0-9a-f]+)\)/, 1]&.slice(0, 12)
331+
end
332+
end
327333

328334
# GitHub search API has a rate limit of 30 requests per minute for authenticated users
329335
rate_limit = 28

0 commit comments

Comments
 (0)