From 0b9a69ec56b4fd20e9b75862e8ba7b37100bd794 Mon Sep 17 00:00:00 2001 From: Jasder <2053003901@@qq.com> Date: Fri, 24 Jul 2020 15:35:43 +0800 Subject: [PATCH] ADD sha for get trsitie-pileline.yml file api --- README.md | 1 + app/controllers/dev_ops/builds_controller.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8dc5546a3..1013d6f95 100644 --- a/README.md +++ b/README.md @@ -2429,6 +2429,7 @@ http://localhost:3000/api/dev_ops/builds/get_trustie_pipeline.json | jq { "name": ".trustie-pipeline.yml", "path": ".trustie-pipeline.yml", + "sha": "548sfefsafef48sf485s4f", "content": "..jsaf" } ``` diff --git a/app/controllers/dev_ops/builds_controller.rb b/app/controllers/dev_ops/builds_controller.rb index 2c419ea7d..8cbb48e35 100644 --- a/app/controllers/dev_ops/builds_controller.rb +++ b/app/controllers/dev_ops/builds_controller.rb @@ -47,7 +47,7 @@ class DevOps::BuildsController < ApplicationController file = interactor.result return render json: {} if file[:status] - json = {name: file['name'], path: file['path'], content: render_decode64_content(file['content'])} + json = {name: file['name'], path: file['path'], sha: file['sha'], content: render_decode64_content(file['content'])} render json: json end end