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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
b2fc0a51
Commit
b2fc0a51
authored
May 12, 2016
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename `Event#note_commit?` to `commit_note?`
parent
8a7b5b17
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
app/helpers/events_helper.rb
app/helpers/events_helper.rb
+5
-5
app/models/event.rb
app/models/event.rb
+2
-2
No files found.
app/helpers/events_helper.rb
View file @
b2fc0a51
...
@@ -57,7 +57,7 @@ module EventsHelper
...
@@ -57,7 +57,7 @@ module EventsHelper
words
<<
event
.
ref_name
words
<<
event
.
ref_name
words
<<
"at"
words
<<
"at"
elsif
event
.
commented?
elsif
event
.
commented?
if
event
.
note_commit
?
if
event
.
commit_note
?
words
<<
event
.
note_short_commit_id
words
<<
event
.
note_short_commit_id
else
else
words
<<
"#
#{
truncate
event
.
note_target_iid
}
"
words
<<
"#
#{
truncate
event
.
note_target_iid
}
"
...
@@ -84,12 +84,12 @@ module EventsHelper
...
@@ -84,12 +84,12 @@ module EventsHelper
elsif
event
.
merge_request?
elsif
event
.
merge_request?
namespace_project_merge_request_url
(
event
.
project
.
namespace
,
namespace_project_merge_request_url
(
event
.
project
.
namespace
,
event
.
project
,
event
.
merge_request
)
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
,
namespace_project_commit_url
(
event
.
project
.
namespace
,
event
.
project
,
event
.
note_target
)
event
.
note_target
)
elsif
event
.
note?
elsif
event
.
note?
if
event
.
note_target
if
event
.
note_target
if
event
.
note_commit
?
if
event
.
commit_note
?
namespace_project_commit_path
(
event
.
project
.
namespace
,
event
.
project
,
namespace_project_commit_path
(
event
.
project
.
namespace
,
event
.
project
,
event
.
note_commit_id
,
event
.
note_commit_id
,
anchor:
dom_id
(
event
.
target
))
anchor:
dom_id
(
event
.
target
))
...
@@ -134,7 +134,7 @@ module EventsHelper
...
@@ -134,7 +134,7 @@ module EventsHelper
end
end
def
event_note_target_path
(
event
)
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
,
namespace_project_commit_path
(
event
.
project
.
namespace
,
event
.
project
,
event
.
note_target
)
event
.
note_target
)
else
else
...
@@ -146,7 +146,7 @@ module EventsHelper
...
@@ -146,7 +146,7 @@ module EventsHelper
def
event_note_title_html
(
event
)
def
event_note_title_html
(
event
)
if
event
.
note_target
if
event
.
note_target
if
event
.
note_commit
?
if
event
.
commit_note
?
link_to
(
link_to
(
namespace_project_commit_path
(
event
.
project
.
namespace
,
event
.
project
,
namespace_project_commit_path
(
event
.
project
.
namespace
,
event
.
project
,
event
.
note_commit_id
,
event
.
note_commit_id
,
...
...
app/models/event.rb
View file @
b2fc0a51
...
@@ -278,7 +278,7 @@ class Event < ActiveRecord::Base
...
@@ -278,7 +278,7 @@ class Event < ActiveRecord::Base
Commit
.
truncate_sha
(
note_commit_id
)
Commit
.
truncate_sha
(
note_commit_id
)
end
end
def
note_commit
?
def
commit_note
?
target
.
for_commit?
target
.
for_commit?
end
end
...
@@ -295,7 +295,7 @@ class Event < ActiveRecord::Base
...
@@ -295,7 +295,7 @@ class Event < ActiveRecord::Base
end
end
def
note_target_id
def
note_target_id
if
note_commit
?
if
commit_note
?
target
.
commit_id
target
.
commit_id
else
else
target
.
noteable_id
.
to_s
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