diff options
author | twonegatives <whitewhiteheaven@gmail.com> | 2016-12-14 17:37:31 +0300 |
---|---|---|
committer | twonegatives <whitewhiteheaven@gmail.com> | 2017-01-14 12:22:30 +0300 |
commit | 85e0b99471b58078e1e50494ae26eb13430d3a9f (patch) | |
tree | df3d2fdb18a1b315cf77fdd9536bd99046d5313a /app/models/todo.rb | |
parent | f14228f0f2f69a967c483e4aa4ef1568e5fdc49b (diff) | |
download | gitlab-ce-85e0b99471b58078e1e50494ae26eb13430d3a9f.tar.gz |
Notify the user who set auto-merge when merge conflict occurs
Diffstat (limited to 'app/models/todo.rb')
-rw-r--r-- | app/models/todo.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/models/todo.rb b/app/models/todo.rb index f5ade1cc293..4c99aa0d3be 100644 --- a/app/models/todo.rb +++ b/app/models/todo.rb @@ -6,13 +6,15 @@ class Todo < ActiveRecord::Base BUILD_FAILED = 3 MARKED = 4 APPROVAL_REQUIRED = 5 # This is an EE-only feature + UNMERGEABLE = 6 ACTION_NAMES = { ASSIGNED => :assigned, MENTIONED => :mentioned, BUILD_FAILED => :build_failed, MARKED => :marked, - APPROVAL_REQUIRED => :approval_required + APPROVAL_REQUIRED => :approval_required, + UNMERGEABLE => :unmergeable } belongs_to :author, class_name: "User" @@ -66,6 +68,10 @@ class Todo < ActiveRecord::Base end end + def unmergeable? + action == UNMERGEABLE + end + def build_failed? action == BUILD_FAILED end |