Add associated project info to runner details output
This commit is contained in:
parent
16b3368af3
commit
f562a477f2
2 changed files with 14 additions and 0 deletions
|
@ -116,6 +116,13 @@ Example response:
|
||||||
"last_contact": "2016-01-25T16:39:48.066Z",
|
"last_contact": "2016-01-25T16:39:48.066Z",
|
||||||
"name": null,
|
"name": null,
|
||||||
"platform": null,
|
"platform": null,
|
||||||
|
"projects": [
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"name": "GitLab.org / GitLab Community Edition",
|
||||||
|
"path": "gitlab-org/gitlab-ce"
|
||||||
|
}
|
||||||
|
],
|
||||||
"revision": null,
|
"revision": null,
|
||||||
"tag_list": [
|
"tag_list": [
|
||||||
"ruby",
|
"ruby",
|
||||||
|
|
|
@ -369,6 +369,12 @@ module API
|
||||||
expose :id, :variables
|
expose :id, :variables
|
||||||
end
|
end
|
||||||
|
|
||||||
|
class RunnerProjectDetails < Grape::Entity
|
||||||
|
expose :id
|
||||||
|
expose :name_with_namespace, as: :name
|
||||||
|
expose :path_with_namespace, as: :path
|
||||||
|
end
|
||||||
|
|
||||||
class Runner < Grape::Entity
|
class Runner < Grape::Entity
|
||||||
expose :id
|
expose :id
|
||||||
expose :description
|
expose :description
|
||||||
|
@ -381,6 +387,7 @@ module API
|
||||||
expose :tag_list
|
expose :tag_list
|
||||||
expose :version, :revision, :platform, :architecture
|
expose :version, :revision, :platform, :architecture
|
||||||
expose :contacted_at, as: :last_contact
|
expose :contacted_at, as: :last_contact
|
||||||
|
expose :projects, with: Entities::RunnerProjectDetails
|
||||||
end
|
end
|
||||||
|
|
||||||
class Build < Grape::Entity
|
class Build < Grape::Entity
|
||||||
|
|
Loading…
Reference in a new issue