Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
b4171aba3ca8
Commit
b2fc0a51
authored
May 12, 2016
by
Robert Speicher
Browse files
Rename `Event#note_commit?` to `commit_note?`
parent
4026d19909fe
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/helpers/events_helper.rb
View file @
b4171aba
...
...
@@ -57,7 +57,7 @@ def event_feed_title(event)
words
<<
event
.
ref_name
words
<<
"at"
elsif
event
.
commented?
if
event
.
note_
commit?
if
event
.
commit
_note
?
words
<<
event
.
note_short_commit_id
else
words
<<
"#
#{
truncate
event
.
note_target_iid
}
"
...
...
@@ -84,12 +84,12 @@ def event_feed_url(event)
elsif
event
.
merge_request?
namespace_project_merge_request_url
(
event
.
project
.
namespace
,
event
.
project
,
event
.
merge_request
)
elsif
event
.
note?
&&
event
.
note_
commit?
elsif
event
.
note?
&&
event
.
commit
_note
?
namespace_project_commit_url
(
event
.
project
.
namespace
,
event
.
project
,
event
.
note_target
)
elsif
event
.
note?
if
event
.
note_target
if
event
.
note_
commit?
if
event
.
commit
_note
?
namespace_project_commit_path
(
event
.
project
.
namespace
,
event
.
project
,
event
.
note_commit_id
,
anchor:
dom_id
(
event
.
target
))
...
...
@@ -134,7 +134,7 @@ def event_feed_summary(event)
end
def
event_note_target_path
(
event
)
if
event
.
note?
&&
event
.
note_
commit?
if
event
.
note?
&&
event
.
commit
_note
?
namespace_project_commit_path
(
event
.
project
.
namespace
,
event
.
project
,
event
.
note_target
)
else
...
...
@@ -146,7 +146,7 @@ def event_note_target_path(event)
def
event_note_title_html
(
event
)
if
event
.
note_target
if
event
.
note_
commit?
if
event
.
commit
_note
?
link_to
(
namespace_project_commit_path
(
event
.
project
.
namespace
,
event
.
project
,
event
.
note_commit_id
,
...
...
app/models/event.rb
View file @
b4171aba
...
...
@@ -278,7 +278,7 @@ def note_short_commit_id
Commit
.
truncate_sha
(
note_commit_id
)
end
def
note_
commit?
def
commit
_note
?
target
.
for_commit?
end
...
...
@@ -295,7 +295,7 @@ def note_target
end
def
note_target_id
if
note_
commit?
if
commit
_note
?
target
.
commit_id
else
target
.
noteable_id
.
to_s
...
...
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