BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
f7d20a6f
Commit
f7d20a6f
authored
Mar 29, 2016
by
Robert Speicher
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix-mr-comment-commit-pruned' into 'master'
Gracefully handle notes on deleted commits in merge requests Closes #3250 See merge request !3402
parents
999ae7f7
191b9e3f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
4 deletions
+10
-4
CHANGELOG
CHANGELOG
+1
-0
notes_helper.rb
app/helpers/notes_helper.rb
+4
-2
_commit.html.haml
app/views/projects/notes/discussions/_commit.html.haml
+5
-2
No files found.
CHANGELOG
View file @
f7d20a6f
...
...
@@ -11,6 +11,7 @@ v 8.7.0 (unreleased)
- Handle nil descriptions in Slack issue messages (Stan Hu)
- Implement 'Groups View' as an option for dashboard preferences !3379 (Elias W.)
- Implement 'TODOs View' as an option for dashboard preferences !3379 (Elias W.)
- Gracefully handle notes on deleted commits in merge requests (Stan Hu)
v 8.6.2 (unreleased)
- Comments on confidential issues don't show up in activity feed to non-members
...
...
app/helpers/notes_helper.rb
View file @
f7d20a6f
...
...
@@ -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
)
...
...
app/views/projects/notes/discussions/_commit.html.haml
View file @
f7d20a6f
-
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
...
...
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