1 2 3 4 5 6 7 8 9 10 11 12 13
# frozen_string_literal: true FactoryBot.define do factory :resource_label_event do action :add label user { issuable&.author || create(:user) } after(:build) do |event, evaluator| event.issue = create(:issue) unless event.issuable end end end