Skip to content
Merged
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
10 changes: 8 additions & 2 deletions lib/github_changelog_generator/octo_fetcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,14 @@ def commits
barrier = Async::Barrier.new
semaphore = Async::Semaphore.new(MAXIMUM_CONNECTIONS, parent: barrier)

iterate_pages(client, "commits", parent: semaphore) do |new_commits|
@commits.concat(new_commits)
if (since_commit = @options[:since_commit])
iterate_pages(client, "commits_since", since_commit, parent: semaphore) do |new_commits|
@commits.concat(new_commits)
end
else
iterate_pages(client, "commits", parent: semaphore) do |new_commits|
@commits.concat(new_commits)
end
end

barrier.wait
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 @@ -62,6 +62,7 @@ class Options < SimpleDelegator
security_prefix
simple_list
since_tag
since_commit
ssl_ca_file
summary_labels
summary_prefix
Expand Down
3 changes: 3 additions & 0 deletions lib/github_changelog_generator/parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ def self.setup_parser(options)
opts.on("--due-tag x", "Changelog will end before specified tag.") do |v|
options[:due_tag] = v
end
opts.on("--since-commit x", "Fetch only commits after this time. eg. \"2017-01-01 10:00:00\"") do |v|
options[:since_commit] = v
end
opts.on("--max-issues [NUMBER]", Integer, "Maximum number of issues to fetch from GitHub. Default is unlimited.") do |max|
options[:max_issues] = max
end
Expand Down
12 changes: 9 additions & 3 deletions 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 2018" "" ""
.TH "GIT\-GENERATE\-CHANGELOG" "1" "May 2020" "" ""
.
.SH "NAME"
\fBgit\-generate\-changelog\fR \- Generate changelog from GitHub
Expand Down Expand Up @@ -277,6 +277,12 @@ Changelog will start after specified tag\.
Changelog will end before specified tag\.
.
.P
\-\-since\-commit x
.
.P
Fetch only commits after this time\. eg\. "2017\-01\-01 10:00:00"
.
.P
\-\-max\-issues [NUMBER]
.
.P
Expand Down Expand Up @@ -375,7 +381,7 @@ GitHub pull requests that have been merged whose merge commit SHA has been modif
Written by Petr Korolev sky4winder@gmail\.com
.
.SH "REPORTING BUGS"
<\fIhttps://github\.com/github-changelog-generator/github\-changelog\-generator/issues\fR>
<\fIhttps://github\.com/github\-changelog\-generator/github\-changelog\-generator/issues\fR>
.
.SH "SEE ALSO"
<\fIhttps://github\.com/github-changelog-generator/github\-changelog\-generator/\fR>
<\fIhttps://github\.com/github\-changelog\-generator/github\-changelog\-generator/\fR>
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 @@ -187,6 +187,10 @@ Automatically generate changelog from your tags, issues, labels and pull request

Changelog will end before specified tag.

--since-commit x

Fetch only commits after this time. eg. "2017-01-01 10:00:00"

--max-issues [NUMBER]

Maximum number of issues to fetch from GitHub. Default is unlimited.
Expand Down