[英]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.