Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Azure DevOps Services | Azure DevOps Server | Azure DevOps Server 2022
Use these samples as starting points for your own extensions. Each sample demonstrates a small number of contributions so you can see how they work in isolation. All source code is in the Azure DevOps extension samples repo.
Tip
For the latest extension development guidance, including theming and migration from VSS.SDK, see the Azure DevOps Extension SDK developer portal.
The following table lists the samples in the repo and the contribution types each one demonstrates.
| Sample | Contributions | Description |
|---|---|---|
| BreadcrumbService | Breadcrumb Service, Hub | Adds a breadcrumb service, which adds a Sample Breadcrumb Item to the sample hub. To see this item, go to the Sample Hub in the Pipelines hub group. |
| CodeEditorContribution | Code Editor | Adds a language definition and a JSON schema for the code editor. |
| Feature | Feature, Hub, Property Provider | Shows how to hook into the Preview Features panel under the user profile menu. Adds a simple hub that only shows when you turn on an "ABC" feature. You can toggle the feature on and off, per user or per organization. |
| Hub | Hub | Adds a hub named Sample Hub into the Pipelines hub group. The Sample Hub is on a project-level page, under the Pipelines navigation element. |
| Menu | Build Definition Menu Item | Adds a Sample build definition menu item to the Builds hub in the dropdown actions menu. The menu handler gets the current build definition from the context passed, makes a REST call, and then shows the result in a message box. |
| Panel | Panel Content, Hub | Applied within the Hub sample. Contains a toggle button along with OK and Cancel buttons. Can be used as a custom panel or dialog content. |
| Pivot | Web Tab | Adds a Sample Pivot tab to the organization or project collection home page, next to Projects, My work items, and My pull requests. |
| Pills | Pill Provider | Adds pills to the title of the Pipeline definition (Runs) page. |
| QueryParamsHandler | Event Subscription | Adds a service that loads on any page whenever a showMyPanel query parameter presents in the URL when any page gets loaded. The startup service shows the custom panel from the Panel sample, using an optional myPanelTitle query parameter as the panel title. |
| RepositoryActions | Menu Item | Adds a Sample repository action menu item to the repository picker in the header of code hub pages. If the href property shows, select the action to go to the given URL. If the uri property is provided, that code executes when you select the action. |
| RepositoryServiceHub | Hub | Adds a Repository Information hub to the Code hub group. Demonstrates how to interact with the IVersionControlRepositoryService to obtain basic information about a user's Git repository. |
| WorkItemFormGroup | Work Item Form Group | Adds a Sample WorkItem Form Group extension to the work item form to show how to interact with the IWorkItemFormService service and IWorkItemNotificationListener. Provides a UI to show case how to change field values using the form service and displaying work item form notification events. |
| WorkItemOpen | Hub | Adds a Sample WorkItem Open hub to the Boards hub group to show how to interact with the IWorkItemFormNavigationService service. Provides a UI for you to open an existing work item by ID, or open the work item form for a new work item by work item type. Either of these options open a dialog in the host frame. |
Community examples (DevLabs)
These open-source extensions from Microsoft DevLabs show real-world patterns you can adapt.
| Sample | Source | Contributions | Description |
|---|---|---|---|
| Team Calendar | GitHub | Hub, Event sources | Track events important to your team, view and manage days off, quickly see when sprints start and end, and more. |
| WSJF (Weighted Shortest Job First) | GitHub | Notification (work item), Context menu action (work item) | Auto calculates WSJF (weighted shortest job first) per work item and stores it in a work item field. |
| Cascading Lists | GitHub | Work Item Form | Define cascading behavior for picklists in work item form. |
| Retrospectives | GitHub | Hub | First-class experience for retrospectives and general feedback board scenarios. Collect feedback on your project milestones, organize and prioritize, and create and track actionable tasks, which can help your team improve over time. |
| Estimate | GitHub | Hub, Work item action menu | Play Planning Poker in Azure DevOps. Select work from an iteration, query, or your backlog, estimate the effort of those items with your team, and immediately update the work items. |
| Multivalue control | GitHub | Work item form | A work item form control, which allows selection of multiple values. |
| Azure DevOps Extension Tasks | GitHub | Build and release tasks | Azure Pipelines tasks for packaging and publishing Azure DevOps and Visual Studio extensions to the Visual Studio Marketplace. |
Get started
For a step-by-step walkthrough, see Develop a web extension. You can also clone the Azure DevOps extension sample repo and use any sample as a starting template.