diff --git a/doc/api/runners.md b/doc/api/runners.md index a8b95ee49ed..ab73250fc7c 100644 --- a/doc/api/runners.md +++ b/doc/api/runners.md @@ -116,6 +116,13 @@ Example response: "last_contact": "2016-01-25T16:39:48.066Z", "name": null, "platform": null, + "projects": [ + { + "id": 1, + "name": "GitLab.org / GitLab Community Edition", + "path": "gitlab-org/gitlab-ce" + } + ], "revision": null, "tag_list": [ "ruby", diff --git a/lib/api/entities.rb b/lib/api/entities.rb index bdbf2cf5082..0170fa5a654 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -369,6 +369,12 @@ module API expose :id, :variables end + class RunnerProjectDetails < Grape::Entity + expose :id + expose :name_with_namespace, as: :name + expose :path_with_namespace, as: :path + end + class Runner < Grape::Entity expose :id expose :description @@ -381,6 +387,7 @@ module API expose :tag_list expose :version, :revision, :platform, :architecture expose :contacted_at, as: :last_contact + expose :projects, with: Entities::RunnerProjectDetails end class Build < Grape::Entity