Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
ade5e0b1
Commit
ade5e0b1
authored
Feb 23, 2017
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix new offenses
parent
f88ff0cc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
app/controllers/projects/pipelines_controller.rb
app/controllers/projects/pipelines_controller.rb
+4
-4
lib/api/v3/notes.rb
lib/api/v3/notes.rb
+2
-2
No files found.
app/controllers/projects/pipelines_controller.rb
View file @
ade5e0b1
...
@@ -13,16 +13,16 @@ class Projects::PipelinesController < Projects::ApplicationController
...
@@ -13,16 +13,16 @@ class Projects::PipelinesController < Projects::ApplicationController
.
page
(
params
[
:page
])
.
page
(
params
[
:page
])
.
per
(
30
)
.
per
(
30
)
@running_count
=
PipelinesFinder
.
@running_count
=
PipelinesFinder
.
new
(
project
).
execute
(
scope:
'running'
).
count
.
new
(
project
).
execute
(
scope:
'running'
).
count
@pending_count
=
PipelinesFinder
.
@pending_count
=
PipelinesFinder
.
new
(
project
).
execute
(
scope:
'pending'
).
count
.
new
(
project
).
execute
(
scope:
'pending'
).
count
@finished_count
=
PipelinesFinder
.
@finished_count
=
PipelinesFinder
.
new
(
project
).
execute
(
scope:
'finished'
).
count
.
new
(
project
).
execute
(
scope:
'finished'
).
count
@pipelines_count
=
PipelinesFinder
.
@pipelines_count
=
PipelinesFinder
.
new
(
project
).
execute
.
count
.
new
(
project
).
execute
.
count
respond_to
do
|
format
|
respond_to
do
|
format
|
...
...
lib/api/v3/notes.rb
View file @
ade5e0b1
...
@@ -5,7 +5,7 @@ module API
...
@@ -5,7 +5,7 @@ module API
before
{
authenticate!
}
before
{
authenticate!
}
NOTEABLE_TYPES
=
[
Issue
,
MergeRequest
,
Snippet
]
NOTEABLE_TYPES
=
[
Issue
,
MergeRequest
,
Snippet
]
.
freeze
params
do
params
do
requires
:id
,
type:
String
,
desc:
'The ID of a project'
requires
:id
,
type:
String
,
desc:
'The ID of a project'
...
@@ -85,7 +85,7 @@ module API
...
@@ -85,7 +85,7 @@ module API
note
=
::
Notes
::
CreateService
.
new
(
user_project
,
current_user
,
opts
).
execute
note
=
::
Notes
::
CreateService
.
new
(
user_project
,
current_user
,
opts
).
execute
if
note
.
valid?
if
note
.
valid?
present
note
,
with:
::
API
::
V3
::
Entities
::
const_get
(
note
.
class
.
name
)
present
note
,
with:
::
API
::
V3
::
Entities
.
const_get
(
note
.
class
.
name
)
else
else
not_found!
(
"Note
#{
note
.
errors
.
messages
}
"
)
not_found!
(
"Note
#{
note
.
errors
.
messages
}
"
)
end
end
...
...
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