From 22d7478349876b2329b7d6c6faa2b1cd072a0562 Mon Sep 17 00:00:00 2001 From: victor <121183489011@qq.com> Date: Mon, 1 Feb 2021 10:36:30 +0800 Subject: [PATCH] =?UTF-8?q?content=E6=8E=A5=E5=8F=A3=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E5=88=86=E6=94=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/ci/pipelines_controller.rb | 1 + app/views/ci/pipelines/content.json.jbuilder | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/ci/pipelines_controller.rb b/app/controllers/ci/pipelines_controller.rb index bc2a33108..b75a8478b 100644 --- a/app/controllers/ci/pipelines_controller.rb +++ b/app/controllers/ci/pipelines_controller.rb @@ -166,6 +166,7 @@ class Ci::PipelinesController < Ci::BaseController pipeline.event.split(',').each { |event| trigger += " - #{event}\r\n"} end @yaml += "trigger:\r\n" + trigger unless trigger.blank? + @branch = pipeline.branch end # =========阶段相关接口========= # diff --git a/app/views/ci/pipelines/content.json.jbuilder b/app/views/ci/pipelines/content.json.jbuilder index 60d211b94..622c97a3f 100644 --- a/app/views/ci/pipelines/content.json.jbuilder +++ b/app/views/ci/pipelines/content.json.jbuilder @@ -1,3 +1,4 @@ json.content @yaml json.sync @sync -json.sha @sha \ No newline at end of file +json.sha @sha +json.branch @branch \ No newline at end of file