2021-12-11 22:18:48 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module MergeRequestReviewerState
|
|
|
|
extend ActiveSupport::Concern
|
|
|
|
|
|
|
|
included do
|
|
|
|
enum state: {
|
|
|
|
unreviewed: 0,
|
2022-10-11 01:57:18 +05:30
|
|
|
reviewed: 1
|
2021-12-11 22:18:48 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
validates :state,
|
|
|
|
presence: true,
|
|
|
|
inclusion: { in: self.states.keys }
|
|
|
|
end
|
|
|
|
end
|