Skip to content
Snippets Groups Projects
Commit 534eddeb authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Merge pull request #307 from gdunkle/with_project_name_2

expose project name
parents f9df14d0 c30a1ee6
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -25,7 +25,7 @@ class Build < ActiveRecord::Base
serialize :push_data
 
attr_accessible :project_id, :ref, :sha, :before_sha,
:status, :finished_at, :trace, :started_at, :push_data, :runner_id
:status, :finished_at, :trace, :started_at, :push_data, :runner_id, :project_name
 
validates :sha, presence: true
validates :ref, presence: true
Loading
Loading
@@ -157,4 +157,8 @@ class Build < ActiveRecord::Base
def allow_git_fetch
project.allow_git_fetch
end
def project_name
project.name
end
end
module API
module Entities
class Build < Grape::Entity
expose :id, :commands, :path, :ref, :sha, :project_id, :repo_url, :before_sha, :timeout, :allow_git_fetch
expose :id, :commands, :path, :ref, :sha, :project_id, :repo_url, :before_sha, :timeout, :allow_git_fetch, :project_name
end
 
class Runner < Grape::Entity
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment