debian-mirror-gitlab/lib/gitlab/ci/pipeline/chain/remove_unwanted_chat_jobs.rb

26 lines
610 B
Ruby
Raw Normal View History

2019-03-02 22:35:43 +05:30
# frozen_string_literal: true
module Gitlab
module Ci
module Pipeline
module Chain
class RemoveUnwantedChatJobs < Chain::Base
def perform!
2019-07-07 11:18:12 +05:30
return unless pipeline.config_processor && pipeline.chat?
# When scheduling a chat pipeline we only want to run the build
# that matches the chat command.
pipeline.config_processor.jobs.select! do |name, _|
name.to_s == command.chat_data[:command].to_s
end
2019-03-02 22:35:43 +05:30
end
def break?
false
end
end
end
end
end
end