Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
GitLab FOSS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
4
Snippets
Groups
Projects
Show more breadcrumbs
GitLab.org
GitLab FOSS
Commits
191b9e3f
Commit
191b9e3f
authored
8 years ago
by
Stan Hu
Browse files
Options
Downloads
Patches
Plain Diff
Gracefully handle notes on deleted commits in merge requests
Closes
#3250
parent
30e4d3ce
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!3402
Gracefully handle notes on deleted commits in merge requests
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG
+1
-0
1 addition, 0 deletions
CHANGELOG
app/helpers/notes_helper.rb
+4
-2
4 additions, 2 deletions
app/helpers/notes_helper.rb
app/views/projects/notes/discussions/_commit.html.haml
+5
-2
5 additions, 2 deletions
app/views/projects/notes/discussions/_commit.html.haml
with
10 additions
and
4 deletions
CHANGELOG
+
1
−
0
View file @
191b9e3f
...
...
@@ -8,6 +8,7 @@ v 8.7.0 (unreleased)
- Add links to CI setup documentation from project settings and builds pages
- 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
...
...
This diff is collapsed.
Click to expand it.
app/helpers/notes_helper.rb
+
4
−
2
View file @
191b9e3f
...
...
@@ -5,8 +5,10 @@ def note_for_main_target?(note)
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
)
...
...
This diff is collapsed.
Click to expand it.
app/views/projects/notes/discussions/_commit.html.haml
+
5
−
2
View file @
191b9e3f
-
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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment