mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-19 17:46:07 +10:00
Merge branch 'fix-mr-comment-commit-pruned' into 'master'
Gracefully handle notes on deleted commits in merge requests Closes #3250 See merge request !3402 Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
@@ -21,6 +21,7 @@ v 8.6.2
|
||||
- Fix background when editing a highlighted note. !3423
|
||||
- Remove tabstop from the WIP toggle links. !3426
|
||||
- Ensure private project snippets are not viewable by unauthorized people.
|
||||
- Gracefully handle notes on deleted commits in merge requests (Stan Hu). !3402
|
||||
|
||||
v 8.6.1
|
||||
- Add option to reload the schema before restoring a database backup. !2807
|
||||
|
||||
@@ -5,8 +5,10 @@ module NotesHelper
|
||||
end
|
||||
|
||||
def note_target_fields(note)
|
||||
hidden_field_tag(:target_type, note.noteable.class.name.underscore) +
|
||||
hidden_field_tag(:target_id, note.noteable.id)
|
||||
if note.noteable
|
||||
hidden_field_tag(:target_type, note.noteable.class.name.underscore) +
|
||||
hidden_field_tag(:target_id, note.noteable.id)
|
||||
end
|
||||
end
|
||||
|
||||
def note_editable?(note)
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
- note = discussion_notes.first
|
||||
- commit = note.noteable
|
||||
- commit_description = commit ? 'commit' : 'a deleted commit'
|
||||
.discussion.js-toggle-container{ class: note.discussion_id }
|
||||
.discussion-header
|
||||
.discussion-actions
|
||||
@@ -7,8 +9,9 @@
|
||||
Show/hide discussion
|
||||
%div
|
||||
= link_to_member(@project, note.author, avatar: false)
|
||||
started a discussion on commit
|
||||
= link_to(note.noteable.short_id, namespace_project_commit_path(note.project.namespace, note.project, note.noteable), class: 'monospace')
|
||||
%p started a discussion on #{commit_description}
|
||||
- if commit
|
||||
= link_to(commit.short_id, namespace_project_commit_path(note.project.namespace, note.project, note.noteable), class: 'monospace')
|
||||
.last-update.hide.js-toggle-content
|
||||
- last_note = discussion_notes.last
|
||||
last updated by
|
||||
|
||||
Reference in New Issue
Block a user