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
iv
gitlab-ce
Commits
091b8a6e
Commit
091b8a6e
authored
Mar 31, 2016
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename Note#for_project_snippet? to #for_snippet?
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
0af8587d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
app/models/note.rb
app/models/note.rb
+1
-1
app/services/todo_service.rb
app/services/todo_service.rb
+1
-1
lib/gitlab/note_data_builder.rb
lib/gitlab/note_data_builder.rb
+1
-1
lib/gitlab/url_builder.rb
lib/gitlab/url_builder.rb
+1
-1
No files found.
app/models/note.rb
View file @
091b8a6e
...
...
@@ -311,7 +311,7 @@ class Note < ActiveRecord::Base
for_merge_request?
&&
for_diff_line?
end
def
for_
project_
snippet?
def
for_snippet?
noteable_type
==
"Snippet"
end
...
...
app/services/todo_service.rb
View file @
091b8a6e
...
...
@@ -123,7 +123,7 @@ class TodoService
def
handle_note
(
note
,
author
)
# Skip system notes, and notes on project snippet
return
if
note
.
system?
||
note
.
for_
project_
snippet?
return
if
note
.
system?
||
note
.
for_snippet?
project
=
note
.
project
target
=
note
.
noteable
...
...
lib/gitlab/note_data_builder.rb
View file @
091b8a6e
...
...
@@ -41,7 +41,7 @@ module Gitlab
data
[
:issue
]
=
note
.
noteable
.
hook_attrs
elsif
note
.
for_merge_request?
data
[
:merge_request
]
=
note
.
noteable
.
hook_attrs
elsif
note
.
for_
project_
snippet?
elsif
note
.
for_snippet?
data
[
:snippet
]
=
note
.
noteable
.
hook_attrs
end
...
...
lib/gitlab/url_builder.rb
View file @
091b8a6e
...
...
@@ -46,7 +46,7 @@ module Gitlab
merge_request
=
MergeRequest
.
find
(
note
.
noteable_id
)
merge_request_url
(
merge_request
,
anchor:
"note_
#{
note
.
id
}
"
)
elsif
note
.
for_
project_
snippet?
elsif
note
.
for_snippet?
snippet
=
Snippet
.
find
(
note
.
noteable_id
)
project_snippet_url
(
snippet
,
anchor:
"note_
#{
note
.
id
}
"
)
...
...
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