Commit b409c376 authored by Douwe Maan's avatar Douwe Maan
Browse files

Merge branch 'fix-stuck-mr' into 'master'

fix stuck mr

If `locked?` & `locked_at.nil?` is nil return that the merge has been locked long enough and those are old merges stuck in locked state.

Fixes #348. Related to a5a5169351d9. Replaces !517.

/cc @DouweM

See merge request !526
......@@ -76,6 +76,7 @@ v 7.10.0 (unreleased)
- Bust group page project list cache when namespace name or path changes.
- Explicitly set image alt-attribute to prevent graphical glitches if gravatars could not be loaded
- Allow user to choose a public email to show on public profile
- Fix stuck Merge Request merging events from old installations (Ben Bodenmiller)
v 7.9.3
- Contains no changes
......
......@@ -361,6 +361,8 @@ def source_branches
end
def locked_long_ago?
locked_at && locked_at < (Time.now - 1.day)
return false unless locked?
locked_at.nil? || locked_at < (Time.now - 1.day)
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