debian-mirror-gitlab/lib/gitlab/audit/deploy_token_author.rb
2022-07-17 14:43:12 +02:00

17 lines
388 B
Ruby

# frozen_string_literal: true
module Gitlab
module Audit
class DeployTokenAuthor < Gitlab::Audit::NullAuthor
def initialize(name: nil)
super(id: -2, name: name)
end
# Events that are authored by a deploy token, should be
# shown as authored by `Deploy Token` in the UI.
def name
@name || _('Deploy Token')
end
end
end
end