2018-11-09 13:39:43 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-10-03 12:58:33 -04:00
|
|
|
module Gitlab
|
|
|
|
module Git
|
|
|
|
class WikiPageVersion
|
2021-03-04 19:09:24 -05:00
|
|
|
include Gitlab::Utils::StrongMemoize
|
|
|
|
|
2017-10-03 12:58:33 -04:00
|
|
|
attr_reader :commit, :format
|
|
|
|
|
|
|
|
def initialize(commit, format)
|
|
|
|
@commit = commit
|
|
|
|
@format = format
|
|
|
|
end
|
|
|
|
|
2021-01-19 01:10:50 -05:00
|
|
|
delegate :message, :sha, :id, :author_name, :author_email, :authored_date, to: :commit
|
|
|
|
|
2021-03-04 19:09:24 -05:00
|
|
|
def author
|
|
|
|
strong_memoize(:author) do
|
|
|
|
::User.find_by_any_email(author_email)
|
|
|
|
end
|
2021-01-19 01:10:50 -05:00
|
|
|
end
|
2017-10-03 12:58:33 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|