事件
新增中樞群組
Azure DevOps Services | Azure DevOps Server 2022 - Azure DevOps Server 2019
我們將建立中樞群組,並將中樞新增至該群組。 如果您尚未建立 Hello 中樞, 請先建立 Hello 中樞 ,然後遵循下列步驟來建立中樞群組。
在參與中將中樞群組新增至應用程式的指令清單檔案,如下所示。
JSON"contributions": [ { "id": "sample-hub-group", "type": "ms.vss-web.hub-group", "description": "Adds a 'Samples' hub group at the project/team-level", "targets": [ "ms.vss-web.project-hub-groups-collection" ], "properties": { "name": "Samples", "order": 100 } }, ]
查看參與目標參考,以查看 可參與的可用中樞群組。
變更中樞貢獻,使其位於您剛才建立的範例中樞群組中。 只要將目標更新為您剛才新增之中樞群組的相對貢獻標識碼即可。
JSON{ "id": "Fabrikam.HelloWorld", "type": "ms.vss-web.hub", "description": "Adds a 'Hello' hub to the Work hub group.", "targets": [ ".sample-hub-group" ], "properties": { "name": "Hello", "order": 99, "uri": "hello-world.html" } }
安裝 您的延伸模組。
現在您的中樞會出現在 [範例] 中樞群組底下。
以下是範例中樞群組中 Hello 的完整擴充指令清單。
JSON
{
"namespace": "Fabrikam.myextension",
"name": "My Extension",
"description": "This is my first extension",
"version": "1.0",
"provider": {
"name": "Fabrikam Fiber Inc"
},
"baseUri": "https://localhost:port",
"icon": "images/logo.png",
"links": {
"info": "info.html",
"support": "support.html",
"termsOfService": "terms-of-service.html"
},
"contributions": {
"vss.web#hubGroups.project": [
{
"id": "samples",
"name": "Samples",
"order": 30
}
],
"vss.web#hubs": [
{
"id": "myhub",
"name": "Hello",
"groupId": "samples",
"uri": "hello-world.html"
}
]
}
}
提示
請參閱使用 Azure DevOps 擴充功能 SDK 進行擴充功能開發的最新檔。