gitlab-org--gitlab-foss/lib/gitlab/audit/deploy_token_author.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
388 B
Ruby
Raw Normal View History

# 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