-
- Downloads
API support for the 'since' and 'until' operators on commit requests
- Parameter validation as ISO8601 format
- CHANGELOG 1 addition, 0 deletionsCHANGELOG
- Gemfile.lock 1 addition, 1 deletionGemfile.lock
- app/controllers/projects/commits_controller.rb 1 addition, 1 deletionapp/controllers/projects/commits_controller.rb
- app/controllers/projects/graphs_controller.rb 2 additions, 2 deletionsapp/controllers/projects/graphs_controller.rb
- app/models/repository.rb 4 additions, 2 deletionsapp/models/repository.rb
- doc/api/commits.md 2 additions, 0 deletionsdoc/api/commits.md
- lib/api/commits.rb 7 additions, 1 deletionlib/api/commits.rb
- lib/api/helpers.rb 16 additions, 0 deletionslib/api/helpers.rb
- lib/gitlab/push_data_builder.rb 1 addition, 1 deletionlib/gitlab/push_data_builder.rb
- spec/models/repository_spec.rb 1 addition, 1 deletionspec/models/repository_spec.rb
- spec/requests/api/commits_spec.rb 35 additions, 0 deletionsspec/requests/api/commits_spec.rb
-
Sir,
Can you show me a way to get commits from a particular day. I have tried many time. I don't know actual syntax
curl -H "PRIVATE-TOKEN: <TOKEN>" "http://code.redpanthers.co/api/v3/projects/187/repository/commits?ref_name=dev&since='2016-05-18T09:36:12.163Z'"
curl -H "PRIVATE-TOKEN: <TOKEN>" "http://code.redpanthers.co/api/v3/projects/187/repository/commits?ref_name=dev&since=2016-05-17T09:36:12.163Z"
\Javascript
var getBranchCommit = HTTP.get(url,{ headers:{ "PRIVATE-TOKEN":getGitLabUser.gitlab }, params:{ ref_name: branch.name, since: moment(currentDate).format() } });
also tried
moment().toISOString()
Edited by username-removed-540554 -
Hi Sibin,
Could you try with something like?
curl -H "PRIVATE-TOKEN: " "http://code.redpanthers.co/api/v3/projects/187/repository/commits?ref_name=dev&since=2016-05-17T00:00:00Z&until=2016-05-18T00:00:00Z"
So you should get the commits for the 2016-05-17 day.
Are you getting some specific response to your API requests? Like bad requests parameters or something like that. I think the single quotes that quote your since value parameter are not right and probably the milliseconds that you're adding needs to be removed (just to try to find out the problem)
-
mentioned in issue #20364 (moved)