BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
553bac57
Commit
553bac57
authored
Feb 04, 2016
by
Tomasz Maczukin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add token to runner details output in API
parent
dc32af95
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
1 deletion
+3
-1
runners.md
doc/api/runners.md
+1
-0
entities.rb
lib/api/entities.rb
+1
-0
runners.rb
lib/api/runners.rb
+1
-1
No files found.
doc/api/runners.md
View file @
553bac57
...
...
@@ -126,6 +126,7 @@ Example response:
"path"
:
"gitlab-org/gitlab-ce"
}
],
"token"
:
"205086a8e3b9a2b818ffac9b89d102"
,
"revision"
:
null
,
"tag_list"
:
[
"ruby"
,
...
...
lib/api/entities.rb
View file @
553bac57
...
...
@@ -387,6 +387,7 @@ module API
expose
:tag_list
expose
:version
,
:revision
,
:platform
,
:architecture
expose
:contacted_at
,
as: :last_contact
expose
:token
,
if:
lambda
{
|
runner
,
options
|
options
[
:user_is_admin
]
||
!
runner
.
is_shared?
}
expose
:projects
,
with:
Entities
::
RunnerProjectDetails
end
...
...
lib/api/runners.rb
View file @
553bac57
...
...
@@ -33,7 +33,7 @@ module API
runner
=
get_runner
(
params
[
:id
])
can_show_runner?
(
runner
)
unless
current_user
.
is_admin?
present
runner
,
with:
Entities
::
RunnerDetails
present
runner
,
with:
Entities
::
RunnerDetails
,
user_is_admin:
current_user
.
is_admin?
end
# Update runner's details
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment