Azure DevOps Webhooks(服务挂钩)缺少“描述"或“复制步骤"之类的字段 [英] Azure DevOps Webhooks (Service Hooks) Missing Fields like Description or Repro Steps

查看:45
本文介绍了Azure DevOps Webhooks(服务挂钩)缺少“描述"或“复制步骤"之类的字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究ASP.NET Core 5项目,该项目将使用对我组织的Azure DevOps服务挂钩(Webhooks)的订阅.我将分析事件有效负载的数据(和元数据).

I am working on ASP.NET Core 5 project, which will use a subscription to my organization's Azure DevOps Service Hooks (Webhooks). I will analyze event payload's data (and metadata).

我从此处检查了有效负载包含哪些事件: https://docs.microsoft.com/zh-CN/azure/devops/service-hooks/events?view=azure-devops#workitem.updated

I checked what event payloads contains from here: https://docs.microsoft.com/en-us/azure/devops/service-hooks/events?view=azure-devops#workitem.updated

,并且还下载了此NuGet软件包: https://www.nuget.org/packages/Microsoft.AspNet.WebHooks.Receivers.vsts

And also downloaded this NuGet package: https://www.nuget.org/packages/Microsoft.AspNet.WebHooks.Receivers.vsts

但是有一个问题.我在文档中以及在NuGet包中都找不到工作项的说明".字段或Bug的复制步骤";领域.这两个字段是我的项目有效负载中最重要的字段.

But there is a problem. I cannot find (in the docs and also in the NuGet package) Work Item's "Description" field or Bug's "Repro Steps" fields. These two fields are most important fields from payload for my project.

这些字段是否隐藏在某个地方?还是可以在有效载荷中包含这些字段?

Are these fields hidden somewhere? Or is possible to include these fields in payload?

推荐答案

查询

After querying Work Item Types Field - List rest api which used to get a list of fields for a work item type with detailed references.

 {
      "alwaysRequired": false,
      "defaultValue": null,
      "allowedValues": [],
      "dependentFields": [],
      "referenceName": "System.Description",
      "name": "Description",
      "url": "https://dev.azure.com/fabrikam/_apis/wit/fields/System.Description"
    },

Description字段的referenceName应该为 System.Description .

The referenceName of Description field should be System.Description.

正如您所指出的,似乎这并不包含在webhook事件有效负载中.

As you have pointed, seems this is not include in webhook event payload.

您可能必须使用工作项Rest API来查询相应的信息.

You may have to use work item Rest API to query corresponding info.

这篇关于Azure DevOps Webhooks(服务挂钩)缺少“描述"或“复制步骤"之类的字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆