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