ADD sha for get trsitie-pileline.yml file api

This commit is contained in:
Jasder 2020-07-24 15:35:43 +08:00
parent 3f92d99136
commit 0b9a69ec56
2 changed files with 2 additions and 1 deletions

View File

@ -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"
}
```

View File

@ -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