diff options
author | Sean McGivern <sean@gitlab.com> | 2017-09-05 16:49:05 +0100 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2017-09-06 10:08:03 +0100 |
commit | e8f29569bcb4a2d732a2c00b34958f58d5622836 (patch) | |
tree | 41b69a559246c423699c741d2f9f252911a2e525 /app/services | |
parent | ac816d90d4cc116117497479f400211a43db6be1 (diff) | |
download | gitlab-ce-e8f29569bcb4a2d732a2c00b34958f58d5622836.tar.gz |
Resolve outdated diff discussions on push
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/discussions/update_diff_position_service.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/services/discussions/update_diff_position_service.rb b/app/services/discussions/update_diff_position_service.rb index 1ef8d9edbe1..746f209e20f 100644 --- a/app/services/discussions/update_diff_position_service.rb +++ b/app/services/discussions/update_diff_position_service.rb @@ -10,6 +10,10 @@ module Discussions discussion.notes.each do |note| if outdated note.change_position = position + + if project.resolve_outdated_diff_discussions? + note.resolve_without_save(current_user, resolved_by_push: true) + end else note.position = position note.change_position = nil |