summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomasz Maczukin <tomasz@maczukin.pl>2016-02-17 21:06:21 +0100
committerTomasz Maczukin <tomasz@maczukin.pl>2016-02-19 13:18:49 +0100
commit7ea60c8564b18788990ce8b45decd0932d71ba6e (patch)
tree5f1ff42f37a5c84a32785f6e777211ba68fd6f5c
parentf8f492e589e27078fe1d061b8ae2264bd798006c (diff)
downloadgitlab-ce-7ea60c8564b18788990ce8b45decd0932d71ba6e.tar.gz
Replace Entities::RunnerProjectDetails with Entities::ForkedFromProject
-rw-r--r--doc/api/runners.md4
-rw-r--r--lib/api/entities.rb8
2 files changed, 5 insertions, 7 deletions
diff --git a/doc/api/runners.md b/doc/api/runners.md
index 600f238a406..276c058e642 100644
--- a/doc/api/runners.md
+++ b/doc/api/runners.md
@@ -122,7 +122,9 @@ Example response:
"projects": [
{
"id": 1,
+ "name": "GitLab Community Edition",
"name_with_namespace": "GitLab.org / GitLab Community Edition",
+ "path": "gitlab-ce",
"path_with_namespace": "gitlab-org/gitlab-ce"
}
],
@@ -170,7 +172,9 @@ Example response:
"projects": [
{
"id": 1,
+ "name": "GitLab Community Edition",
"name_with_namespace": "GitLab.org / GitLab Community Edition",
+ "path": "gitlab-ce",
"path_with_namespace": "gitlab-org/gitlab-ce"
}
],
diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index 09dae1e88e2..3908e2a83c8 100644
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@ -369,12 +369,6 @@ module API
expose :id, :variables
end
- class RunnerProjectDetails < Grape::Entity
- expose :id
- expose :name_with_namespace
- expose :path_with_namespace
- end
-
class Runner < Grape::Entity
expose :id
expose :description
@@ -388,7 +382,7 @@ module API
expose :version, :revision, :platform, :architecture
expose :contacted_at, as: :last_contact
expose :token, if: lambda { |runner, options| options[:current_user].is_admin? || !runner.is_shared? }
- expose :projects, with: Entities::RunnerProjectDetails do |runner, options|
+ expose :projects, with: Entities::ForkedFromProject do |runner, options|
if options[:current_user].is_admin?
runner.projects
else