Azure devops Azure DevOps服务挂钩-“;为…而建![回购项目]![分支机构图标]”;

Azure devops Azure DevOps服务挂钩-“;为…而建![回购项目]![分支机构图标]”;,azure-devops,Azure Devops,我刚刚为我们的现场DevOps服务器中的一个项目设置了一个服务钩子,它使用“传入Webhook”连接器连接Outlook组。 这个钩子似乎工作得很好——我很好地收到了我期待的通知。然而,我认为应该是图形的东西似乎有一个问题 例如,对于“build Successed”服务挂钩,我收到以下电子邮件: 查看状态消息,它指出: "Build for !Repo Icon.... !Branch Icon..." 我想这些应该是图像,但我不明白为什么它们没有这样显示 通过检查从DevOps发送到Of

我刚刚为我们的现场DevOps服务器中的一个项目设置了一个服务钩子,它使用“传入Webhook”连接器连接Outlook组。
这个钩子似乎工作得很好——我很好地收到了我期待的通知。然而,我认为应该是图形的东西似乎有一个问题

例如,对于“build Successed”服务挂钩,我收到以下电子邮件:

查看状态消息,它指出:

"Build for !Repo Icon.... !Branch Icon..."
我想这些应该是图像,但我不明白为什么它们没有这样显示

通过检查从DevOps发送到Office 365的请求JSON,我可以看到它正在传递特定文本,但我认为它被视为链接标记,而不是图像:

"text": "Build for ![Repo Icon](https://cdn.vsassets.io/content/notifications/teams-pushrepo.png) [JamalHartnettUserBranch](https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/_git/71777fbc-1cf2-4bd1-9540-128c1c71f766) ![Branch Icon](https://cdn.vsassets.io/content/notifications/teams-branch.png) [master](https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/_git/71777fbc-1cf2-4bd1-9540-128c1c71f766/#version=GBmaster), finished 04/07/2015 17:24:20 UTC"
有人知道我该怎么解决这个问题吗? 我知道有一个特定的Azure DevOps连接器,但它只适用于基于云的DevOps实例,而不适用于私有的现场实例(至少,据我所知)

以下是完整的json请求消息(删除了私有URL),以供参考:

方法:POST
URI:https://outlook.office.com/webhook//IncomingWebhook//
HTTP版本:1.1
标题:
{
内容类型:application/json;字符集=utf-8
}
内容:
{
“发件人”:“Azure DevOps服务”,
“摘要”:“构建20150407.2-成功”,
“themeColor”:“107c10”,
“标题”:空,
“文本”:空,
“章节”:[{
“标题”:空,
“降价”:没错,
“图像”:空,
“活动标题”:“[CustomerAddressModule/20150407.2](https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/71777fbc-1cf2-4bd1-9540-128c1c71f766/_apis/build/Builds/1)(续)",,
“activitySubtitle”:“触发器:针对[Jamal Hartnett]的batchedCI”(mailto:Jamal。Hartnett@Fabrikamcloud.com)",
“文本”:“构建为![Repo图标](https://cdn.vsassets.io/content/notifications/teams-pushrepo.png)[JamalHartnettUserBranch](https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/_git/71777fbc-1cf2-4bd1-9540-128c1c71f766)![分支图标](https://cdn.vsassets.io/content/notifications/teams-branch.png)[船长](https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/_git/71777fbc-1cf2-4bd1-9540-128c1c71f766/#version=GBmaster),已完成2015年7月4日17:24:20 UTC“,
“活动图像”:https://cdn.vsassets.io/content/notifications/teams-build-succeeded.png",
“活动图像类型”:“文章”
}],
“潜在作用”:[{
“@context”:”http://schema.org",
“@type”:“ViewAction”,
“名称”:“查看生成”,
“目标”:[
"https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/71777fbc-1cf2-4bd1-9540-128c1c71f766/_apis/build/Builds/1"]
}]
}

我假设在显示通知时,您的图像应该进入
部分>图像
,因为另一个正确显示的图像位于
活动图像
属性中。但是,我不确定当从DevOps发送通知时,您是否可以控制在那里添加它们。
Method: POST
URI: https://outlook.office.com/webhook/<obfuscated>/IncomingWebhook/<obfuscated>/<obfuscated>
HTTP Version: 1.1
Headers:
{
  Content-Type: application/json; charset=utf-8
}
Content:
{

    "sender": "Azure DevOps Services",

    "summary": "Build 20150407.2 - succeeded",

    "themeColor": "#107c10",

    "title": null,

    "text": null,

    "sections": [{

        "title": null,

        "markdown": true,

        "images": null,

        "activityTitle": "[CustomerAddressModule / 20150407.2](https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/71777fbc-1cf2-4bd1-9540-128c1c71f766/_apis/build/Builds/1) (Succeeded)",

        "activitySubtitle": "Trigger: batchedCI for [Jamal Hartnett](mailto:Jamal.Hartnett@Fabrikamcloud.com)",

        "text": "Build for ![Repo Icon](https://cdn.vsassets.io/content/notifications/teams-pushrepo.png) [JamalHartnettUserBranch](https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/_git/71777fbc-1cf2-4bd1-9540-128c1c71f766) ![Branch Icon](https://cdn.vsassets.io/content/notifications/teams-branch.png) [master](https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/_git/71777fbc-1cf2-4bd1-9540-128c1c71f766/#version=GBmaster), finished 04/07/2015 17:24:20 UTC",

        "activityImage": "https://cdn.vsassets.io/content/notifications/teams-build-succeeded.png",

        "activityImageType": "article"

        }],

    "potentialAction": [{

        "@context": "http://schema.org",

        "@type": "ViewAction",

        "name": "View build",

        "target": [

            "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/71777fbc-1cf2-4bd1-9540-128c1c71f766/_apis/build/Builds/1"]

    }]

}