Module: StashCoreAPI::Commits
Overview
Interfaces with commits endpoints of Stash CoreAPI API
Instance Method Summary collapse
- #commit_changes(commit_id, limit: nil) ⇒ Object
- #commits(path: nil, since: nil, until_: nil, limit: nil, with_counts: nil) ⇒ Object
Instance Method Details
#commit_changes(commit_id, limit: nil) ⇒ Object
40 41 42 43 44 |
# File 'lib/stash_core_api/commits.rb', line 40 def commit_changes(commit_id, limit: nil) endpoint = "/commits/#{commit_id}/changes" endpoint = "#{endpoint}?limit=#{limit}" if limit perform_get(endpoint) end |
#commits(path: nil, since: nil, until_: nil, limit: nil, with_counts: nil) ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/stash_core_api/commits.rb', line 22 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 |