diff options
author | Patricio Cano <suprnova32@gmail.com> | 2015-09-16 19:54:18 -0500 |
---|---|---|
committer | Patricio Cano <suprnova32@gmail.com> | 2015-09-16 19:54:18 -0500 |
commit | 1ddefa3beabed00f08c893ca66b9f004e3b4e4df (patch) | |
tree | 12c0546f4246b8ee5090c32996f3301207bcf93f /lib/ci/api/entities.rb | |
parent | 1ef2ce95d507c3d21598f26dd8a0e77dfc3c33cf (diff) | |
parent | cac969229aab74ab5dcd7682c4f1c3a74a17b9d6 (diff) | |
download | gitlab-ce-1ddefa3beabed00f08c893ca66b9f004e3b4e4df.tar.gz |
Merge branch 'master' into notification-levels
Diffstat (limited to 'lib/ci/api/entities.rb')
-rw-r--r-- | lib/ci/api/entities.rb | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/lib/ci/api/entities.rb b/lib/ci/api/entities.rb new file mode 100644 index 00000000000..f47bc1236b8 --- /dev/null +++ b/lib/ci/api/entities.rb @@ -0,0 +1,56 @@ +module Ci + module API + module Entities + class Commit < Grape::Entity + expose :id, :ref, :sha, :project_id, :before_sha, :created_at + expose :status, :finished_at, :duration + expose :git_commit_message, :git_author_name, :git_author_email + end + + class CommitWithBuilds < Commit + expose :builds + end + + class Build < Grape::Entity + expose :id, :commands, :ref, :sha, :project_id, :repo_url, + :before_sha, :allow_git_fetch, :project_name + + expose :options do |model| + model.options + end + + expose :timeout do |model| + model.timeout + end + + expose :variables + end + + class Runner < Grape::Entity + expose :id, :token + end + + class Project < Grape::Entity + expose :id, :name, :token, :default_ref, :gitlab_url, :path, + :always_build, :polling_interval, :public, :ssh_url_to_repo, :gitlab_id + + expose :timeout do |model| + model.timeout + end + end + + class RunnerProject < Grape::Entity + expose :id, :project_id, :runner_id + end + + class WebHook < Grape::Entity + expose :id, :project_id, :url + end + + class TriggerRequest < Grape::Entity + expose :id, :variables + expose :commit, using: Commit + end + end + end +end |