diff options
Diffstat (limited to 'neovim/lua/vimrc/azure.lua')
| -rw-r--r-- | neovim/lua/vimrc/azure.lua | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/neovim/lua/vimrc/azure.lua b/neovim/lua/vimrc/azure.lua new file mode 100644 index 0000000..9b6b245 --- /dev/null +++ b/neovim/lua/vimrc/azure.lua @@ -0,0 +1,39 @@ +local M = {} + +function M.setup(opts) + -- assert(opts.org_url, "org url is required. ") + -- assert(opts.pipeline_id, "pipeline id is required. ") + -- assert(opts.api_version, "api version is required. ") + -- assert(opts.basic_auth_token, "basic auth token is required. ") + + -- local functions = {} + -- functions.pipeline_bug = function(output_qf) + -- local cmd = { + -- "/bin/sh", + -- "-c", + -- [[curl -sSL --compressed -X POST -H ]] .. + -- [['Authorization: Basic ]] .. opts.basic_auth_token .. [[' ]] .. + -- [[-H 'Content-Type: application/json' ]] .. + -- [[--data-raw "{ \"previewRun\": true }" ]] .. + -- opts.org_url .. "/_apis/pipelines/" .. opts.pipeline_id .. "/preview?api-version=" .. opts.api_version .. + -- " | jq .finalYaml | xargs -0 printf %b | sed -e 's@^\"@@' -e 's@\"$@@'" + -- } + -- P(cmd) + -- require('firvish.job_control').start_job({ + -- cmd = cmd, + -- filetype = "log", + -- title = "pipeline", + -- listed = true, + -- output_qf = output_qf, + -- is_background_job = false, + -- cwd = opts.chart_dir, + -- }) + -- end + + -- _G.azure_functions = functions + + -- cmd [[command! -bang PipelineBug :lua _G.azure_functions.pipeline_bug("<bang>" ~= "!")]] + +end + +return M |
