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
Léo-Paul Géneau
gitlab-ce
Commits
dc098fde
Commit
dc098fde
authored
Aug 18, 2016
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix MR note discussion ID
parent
ce8cb2f9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
app/models/note.rb
app/models/note.rb
+3
-1
No files found.
app/models/note.rb
View file @
dc098fde
...
@@ -268,7 +268,9 @@ class Note < ActiveRecord::Base
...
@@ -268,7 +268,9 @@ class Note < ActiveRecord::Base
def
build_discussion_id
def
build_discussion_id
if
for_merge_request?
if
for_merge_request?
[
:discussion
,
:
note
,
id
].
join
(
"-"
)
# Notes on merge requests are always in a discussion of their own,
# so we generate a unique discussion ID.
[
:discussion
,
:
note
,
SecureRandom
.
hex
].
join
(
"-"
)
else
else
self
.
class
.
build_discussion_id
(
noteable_type
,
noteable_id
||
commit_id
)
self
.
class
.
build_discussion_id
(
noteable_type
,
noteable_id
||
commit_id
)
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