Commit ef97b27d authored by Grzegorz Bizon's avatar Grzegorz Bizon

Update chat ops service that creates the ops pipeline

parent c206ad40
...@@ -55,24 +55,22 @@ module Gitlab ...@@ -55,24 +55,22 @@ module Gitlab
) )
service.execute(:chat) do |pipeline| service.execute(:chat) do |pipeline|
create_environment_variables(pipeline) build_environment_variables(pipeline)
create_chat_data(pipeline) build_chat_data(pipeline)
end end
end end
# pipeline - The `Ci::Pipeline` to create the environment variables for. # pipeline - The `Ci::Pipeline` to create the environment variables for.
def create_environment_variables(pipeline) def build_environment_variables(pipeline)
pipeline.variables.create!( pipeline.variables.build(
[ [{ key: 'CHAT_INPUT', value: arguments },
{ key: 'CHAT_INPUT', value: arguments }, { key: 'CHAT_CHANNEL', value: channel }]
{ key: 'CHAT_CHANNEL', value: channel }
]
) )
end end
# pipeline - The `Ci::Pipeline` to create the chat data for. # pipeline - The `Ci::Pipeline` to create the chat data for.
def create_chat_data(pipeline) def build_chat_data(pipeline)
pipeline.create_chat_data!( pipeline.build_chat_data(
chat_name_id: chat_name.id, chat_name_id: chat_name.id,
response_url: response_url response_url: response_url
) )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment