Module: StashCoreAPI::Commits
Overview
Interfaces with commits endpoints of Stash CoreAPI API
Instance Method Summary collapse
Instance Method Details
#commits(path: nil, since: nil, until_: nil, limit: nil, with_counts: nil) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/stash_core_api/commits.rb', line 20 def commits(path: nil, since: nil, until_: nil, limit: nil, with_counts: nil) endpoint = '/commits' if path || since || until_ || limit || with_counts endpoint = "#{endpoint}?" endpoint = "#{endpoint}path=#{sanitized_path(path)}&" if path endpoint = "#{endpoint}since=#{since}&" if since endpoint = "#{endpoint}until=#{until_}&" if until_ endpoint = "#{endpoint}limit=#{limit}&" if limit endpoint = "#{endpoint}withCounts=#{with_counts}&" if with_counts end perform_get(endpoint) end |