Commit 467e4e81f4876433ef30602fe75944a8ab16693a
1 parent
201d4897
Exists in
master
and in
4 other branches
Dont show last push widget if user removed this branch
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
1 changed file
with
3 additions
and
0 deletions
Show diff stats
app/helpers/application_helper.rb
| ... | ... | @@ -126,6 +126,9 @@ module ApplicationHelper |
| 126 | 126 | # Skip if user already created appropriate MR |
| 127 | 127 | return false if project.merge_requests.where(source_branch: event.branch_name).opened.any? |
| 128 | 128 | |
| 129 | + # Skip if user removed branch right after that | |
| 130 | + return false unless project.repository.branch_names.include?(event.branch_name) | |
| 131 | + | |
| 129 | 132 | true |
| 130 | 133 | end |
| 131 | 134 | ... | ... |