简体   繁体   English

Azure DevOps NodeJs 客户端创建发布

[英]Azure DevOps NodeJs Client Create Release

I have trouble with the azure nodejs client for the devops api ( https://github.com/microsoft/azure-devops-node-api )我在使用用于 devops api 的 azure nodejs 客户端遇到问题( https://github.com/microsoft/azure-devops-node-api

Basically, I want to create a Release using something like the following code基本上,我想使用类似下面的代码创建一个发布

const azdev = require("azure-devops-node-api")
const interfaces = require("azure-devops-node-api/interfaces/ReleaseInterfaces")
// your collection url
let orgUrl = "REDACTED";
let token = "REDACTED";

let authHandler = azdev.getPersonalAccessTokenHandler(token); 
let connection = new azdev.WebApi(orgUrl, authHandler); 
const releaseApiObject = await connection.getReleaseApi();
const new_release = releaseApiObject.createRelease();

The problem here is the createRelease method.这里的问题是 createRelease 方法。 I cannot figure out what arguments it has to take.我无法弄清楚它必须采取什么 arguments。 Can someone tell me what the谁能告诉我是什么

createRelease(releaseStartMetadata: ReleaseInterfaces.ReleaseStartMetadata, project: string): Promise<ReleaseInterfaces.Release>;

There is no documentation on what the releasestartmetadata is or how i can create it.没有关于 releasestartmetadata 是什么或我如何创建它的文档。

Can someone give me a hint?有人可以给我一个提示吗?

In addition to the reference pointed by Gaurav above, you may also refer to the corresponding REST API definition , which presents the request and response parameters in a much readable form.除了上面 Gaurav 所指的参考之外,您还可以参考对应的REST API 定义,它以可读性很强的形式呈现了请求和响应参数。 :) There is also an example given for reference. :) 还有一个例子供参考。

Hope this helps.希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在NodeJS中创建HTTPS客户端 - Create HTTPS client in NodeJS 如何使用 jquery 触发 Azure Devops 发布管道 - How to trigger Azure Devops release pipeline using jquery 如何在 Azure DevOps 发布期间转换/修改 js 文件 - How to transform/modify a js file during a release in Azure DevOps 如何创建Node.js WebSocket客户端 - How to create a nodejs websocket client Azure Devops(vsts) 扩展 - 如何创建任务附件内容 - Azure Devops(vsts) expension - How to create task attachment content 如何在与客户端连接并行工作的 nodejs 服务器中创建异步函数? - How to create an async function in a nodejs server that works in parallel with client connections? 如何像 angularjs 教程一样使用 nodejs 和 npm 创建 Web 客户端应用程序 - How to create web client application with nodejs and npm like angularjs tutorial 如何使用 async/await 在 NodeJS 中创建 TCP 客户端? - How to create TCP client in NodeJS using async/await? 如何从后端(快递)在nodeJS中创建html文件并将其发送到客户端? - How to create and send html file to client in nodeJS from backend(express)? Azure DevOps WebExtension 使用 WebWorker - Azure DevOps WebExtension use WebWorker
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM