From 347aba67287fedae424c0d52c2728e84a1dec2c2 Mon Sep 17 00:00:00 2001 From: f Date: Mon, 13 Mar 2023 20:47:54 -0300 Subject: [PATCH] feat: seccion de log --- app/jobs/gitlab_notifier_job.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/app/jobs/gitlab_notifier_job.rb b/app/jobs/gitlab_notifier_job.rb index d84ecda2..a127beaf 100644 --- a/app/jobs/gitlab_notifier_job.rb +++ b/app/jobs/gitlab_notifier_job.rb @@ -112,6 +112,7 @@ class GitlabNotifierJob < ApplicationJob # @return [String] def description @description ||= ''.dup.tap do |d| + d << log_section d << request_section d << javascript_section d << javascript_footer @@ -159,6 +160,21 @@ class GitlabNotifierJob < ApplicationJob @client ||= GitlabApiClient.new end + # @return [String] + def log_section + return if unless options.dig(:data, :log) + + <<~LOG + + # Build log + + ``` + #{option[:data].delete(:log)} + ``` + + LOG + end + # Muestra informaciĆ³n de la peticiĆ³n # # @return [String]