Browse Source

联调图形设计化-更新文件不转base64

pull/347/head
xxq250 2 years ago
parent
commit
62de4a0ac8
2 changed files with 3 additions and 3 deletions
  1. +1
    -1
      app/controllers/api/v1/projects/pipelines_controller.rb
  2. +2
    -2
      app/views/api/v1/projects/pipelines/build_pipeline.yaml.erb

+ 1
- 1
app/controllers/api/v1/projects/pipelines_controller.rb View File

@@ -158,7 +158,7 @@ class Api::V1::Projects::PipelinesController < Api::V1::BaseController
filepath: ".gitea/workflows/#{@pipeline.pipeline_name}.yml",
branch: @pipeline.branch,
new_branch: @pipeline.branch,
content: Base64.encode64(@pipeline.yaml).gsub(/\n/, ''),
content: opt == "create" ? Base64.encode64(@pipeline.yaml).gsub(/\n/, '') : @pipeline.yaml,
message: "#{opt} pipeline",
committer: {
email: current_user.mail,


+ 2
- 2
app/views/api/v1/projects/pipelines/build_pipeline.yaml.erb View File

@@ -9,10 +9,10 @@ on:
<% node.input_values.each_key do |key| %>
<%=key %>:
<% if node.input_values[key].blank? %>
- *
- *
<% else %>
<% node.input_values[key].to_s.split(",").each do |val| %>
- <%=val %>
- <%=val %>
<% end %>
<% end %>
<% end %>


Loading…
Cancel
Save