summaryrefslogtreecommitdiff
path: root/app/services/notification_recipients/builder/new_release.rb
blob: 67676b6eec821f90483e54f1e4a188ed9b7bcde5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# frozen_string_literal: true

module NotificationRecipients
  module Builder
    class NewRelease < Base
      attr_reader :target

      def initialize(target)
        @target = target
      end

      def build!
        add_recipients(target.project.authorized_users, :custom, nil)
      end

      def custom_action
        :new_release
      end

      def acting_user
        target.author
      end
    end
  end
end