Dont show last push widget if user removed this branch
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
parent
201d489780
commit
467e4e81f4
|
@ -126,6 +126,9 @@ module ApplicationHelper
|
|||
# Skip if user already created appropriate MR
|
||||
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
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue