Commit 467e4e81 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Dont show last push widget if user removed this branch

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 201d4897
...@@ -126,6 +126,9 @@ module ApplicationHelper ...@@ -126,6 +126,9 @@ module ApplicationHelper
# Skip if user already created appropriate MR # Skip if user already created appropriate MR
return false if project.merge_requests.where(source_branch: event.branch_name).opened.any? return false if project.merge_requests.where(source_branch: event.branch_name).opened.any?
# Skip if user removed branch right after that
return false unless project.repository.branch_names.include?(event.branch_name)
true true
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment