Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-06-21 16:40:17 +0300
committerRobert Speicher <rspeicher@gmail.com>2016-06-21 19:08:15 +0300
commit7315401ebd29bd0cb83bd2479f675d1047012504 (patch)
tree72d35c48fe47e64c971f01ee1bd4ed8aa7ba2f0c /lib
parent421b5aafbc2bf2a45d755bc9a6fc5e741fe8a2d7 (diff)
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.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index 2e397643ed1..2e6dfd7727f 100644
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@ -444,11 +444,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