diff options
author | Tomasz Maczukin <tomasz@maczukin.pl> | 2016-01-14 21:58:17 +0100 |
---|---|---|
committer | Tomasz Maczukin <tomasz@maczukin.pl> | 2016-01-14 21:58:17 +0100 |
commit | 768721dc5895467130b9a3ada9c740a050f4fdff (patch) | |
tree | d96448edb9490825e8384a1b42bbfafa98140a33 /lib/api/entities.rb | |
parent | 7ed5bc5c9b69e6caf45541dc8f820aa59a20c160 (diff) | |
parent | 2f2aada3b6b900fdff276aafc3f93e5a1c1465c6 (diff) | |
download | gitlab-ce-768721dc5895467130b9a3ada9c740a050f4fdff.tar.gz |
Merge branch 'master' into ci/api-triggers
* master: (150 commits)
fixes margin and padding
Update mailroom/postfix documentation [ci skip]
Fix css mess around git clone panel. Align it properly
Fix missing padding for user/group pages
Fix parse_gollum_tags matcher
Update documentation on Banzai::Filter::GollumTagsFilter
Add tests for the wiki pipeline
Refactoring Banzai::Filter::GollumTagsFilter
Make sure the .git is at the end on Gitlab::GithubImport::WikiFormatter
Remove GollumTagsPipeline
Refactoring Gitlab::GithubImport::Importer
Remove unnecessary brackets on WIKI_SLUG_ID route constraints
Move js function to removing accents to vendor/assets/javascripts
Update CHANGELOG
Use the WikiPipeline when rendering the wiki markdown content
Add Banzai::Filter::GollumTagsFilter for parsing Gollum's tags in HTML
Relax constraints for wiki slug
Import GitHub wiki into GitLab
Move Ci::Build#available_statuses to AVAILABLE_STATUSES constant in CommitStatus
Revert changes to how the notes are paginated in the API
...
Conflicts:
doc/api/README.md
lib/api/entities.rb
Diffstat (limited to 'lib/api/entities.rb')
-rw-r--r-- | lib/api/entities.rb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index d3803f4ec70..82a75734de0 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -367,6 +367,33 @@ module API expose :id, :variables end + class Runner < Grape::Entity + expose :id + expose :description + expose :active + expose :is_shared + expose :name + end + + class Build < Grape::Entity + expose :id, :status, :stage, :name, :ref, :tag, :coverage + expose :created_at, :started_at, :finished_at + expose :user, with: User + # TODO: download_url in Ci:Build model is an GitLab Web Interface URL, not API URL. We should think on some API + # for downloading of artifacts (see: https://gitlab.com/gitlab-org/gitlab-ce/issues/4255) + expose :download_url do |repo_obj, options| + if options[:user_can_download_artifacts] + repo_obj.download_url + end + end + expose :commit, with: RepoCommit do |repo_obj, _options| + if repo_obj.respond_to?(:commit) + repo_obj.commit.commit_data + end + end + expose :runner, with: Runner + end + class Trigger < Grape::Entity expose :token, :created_at, :updated_at, :deleted_at, :last_used end |