diff options
author | Rémy Coutable <remy@rymai.me> | 2016-06-21 13:40:17 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-06-21 13:40:17 +0000 |
commit | f411f83dbbccf995a88e3e0fdbe4d3c0a5267796 (patch) | |
tree | eb083fc10367a0519b36355a9cb0de76a219ef0f /lib | |
parent | 408110f82452cd280311de7d1931fa18196dcecf (diff) | |
parent | 92984783db82e98cae06c08c680fd9c766ac52f8 (diff) | |
download | gitlab-ce-f411f83dbbccf995a88e3e0fdbe4d3c0a5267796.tar.gz |
Merge branch 'fix/builds-api-nil-commit' into 'master'
Fix builds API response that did not include commit data
## What does this MR do?
This is fix for problem with builds API response not including information about commit this build is created for.
## What are the relevant issue numbers?
Closes #18476
## Does this MR meet the acceptance criteria?
- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [x] API support added
- Tests
- [x] Added for this feature/bug
- [x] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
See merge request !4827
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/entities.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 0ee96d4c67b..5a23a18fe9c 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -445,11 +445,7 @@ module API expose :created_at, :started_at, :finished_at expose :user, with: User expose :artifacts_file, using: BuildArtifactFile, if: -> (build, opts) { build.artifacts? } - expose :commit, with: RepoCommit do |repo_obj, _options| - if repo_obj.respond_to?(:commit) - repo_obj.commit.commit_data - end - end + expose :commit, with: RepoCommit expose :runner, with: Runner end |