Builds API returns null commit
I'm trying to consume the GitLab Builds API and I'm looking to use the commit information shown in the documentation, however the commit
attribute is always null
:
Request:
$ curl -H "PRIVATE-TOKEN:$TOKEN" https://gitlab.com/api/v3/projects/$PROJECT_ID/builds
Response:
[
{
"commit": null,
"coverage": null,
"created_at": "2016-06-09T18:54:21.176Z",
"finished_at": "2016-06-09T18:54:43.564Z",
"id": # omitted,
"name": "rubocop",
"ref": "feature/improve_ci_config",
"runner": {
"active": true,
"description": "windows-build-runner",
"id": # omitted,
"is_shared": false,
"name": "gitlab-ci-multi-runner"
},
"stage": "linter",
"started_at": "2016-06-09T18:54:24.219Z",
"status": "success",
"tag": false,
"user": {
# omitted
}
}
]
The same is true when requesting details for a single build:
Request:
$ curl -i -H "PRIVATE-TOKEN:$TOKEN" https://gitlab.com/api/v3/projects/$PROJECT_ID/builds/$BUILD_ID
{
"commit": null,
"coverage": null,
"created_at": "2016-06-09T18:54:21.176Z",
"finished_at": "2016-06-09T18:54:43.564Z",
"id": # omitted,
"name": "rubocop",
"ref": "feature/improve_ci_config",
"runner": {
"active": true,
"description": "windows-build-runner",
"id": # omitted,
"is_shared": false,
"name": "gitlab-ci-multi-runner"
},
"stage": "linter",
"started_at": "2016-06-09T18:54:24.219Z",
"status": "success",
"tag": false,
"user": {
# omitted
}
}