Skip to content

Commit 51acb5f

Browse files
authored
docs: enhance examples for adding artifact links to work items (#423)
adding example on how to add artifact links to a work item ## GitHub issue number N/A ## **Associated Risks** None ## ✅ **PR Checklist** - [x] **I have read the [contribution guidelines](https://github.com/microsoft/azure-devops-mcp/blob/main/CONTRIBUTING.md)** - [x] **I have read the [code of conduct guidelines](https://github.com/microsoft/azure-devops-mcp/blob/main/CODE_OF_CONDUCT.md)** - [x] Title of the pull request is clear and informative. - [x] 👌 Code hygiene - [x] 🔭 Telemetry added, updated, or N/A - [x] 📄 Documentation added, updated, or N/A - [x] 🛡️ Automated tests added, or N/A ## 🧪 **How did you test it?** Manual review
1 parent 73113d0 commit 51acb5f

File tree

1 file changed

+22
-7
lines changed

1 file changed

+22
-7
lines changed

docs/EXAMPLES.md

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -157,16 +157,31 @@ Remove link 5678 and 91011 from work item 1234. Also remove any related links an
157157

158158
### Add Artifact Links to Work Items
159159

160-
Use this tool to link work items to repository artifacts like branches, commits, and pull requests. This is particularly useful for GitHub Copilot integration, which requires artifact links to understand repository context.
160+
Use this tool to associate work items with repository artifacts such as branches, commits, and pull requests.
161161

162-
First, you'll need the proper vstfs URI format for your artifact:
162+
You have two options for linking artifacts:
163163

164-
- **Branch**: `vstfs:///Git/Ref/{projectId}%2F{repositoryId}%2FGB{branchName}`
165-
- **Commit**: `vstfs:///Git/Commit/{projectId}%2F{repositoryId}%2F{commitId}`
166-
- **Pull Request**: `vstfs:///Git/PullRequestId/{projectId}%2F{repositoryId}%2F{pullRequestId}`
164+
Supply the complete artifact `vstfs` URI in the required format. For example:
167165

168-
```plaintext
166+
**Branch**:
167+
`vstfs:///Git/Ref/{projectId}%2F{repositoryId}%2FGB{branchName}`
168+
169+
**Commit**:
170+
`vstfs:///Git/Commit/{projectId}%2F{repositoryId}%2F{commitId}`
171+
172+
**Pull Request**:
173+
`vstfs:///Git/PullRequestId/{projectId}%2F{repositoryId}%2F{pullRequestId}`
174+
175+
```text
169176
Add a branch artifact link to work item 1234 in project "Contoso" with URI "vstfs:///Git/Ref/12341234-1234-1234-1234-123412341234%2F12341234-1234-1234-1234-123412341234%2FGBmain" and link type "Branch" with comment "Linked to main branch for GitHub Copilot integration"
170177
```
171178

172-
📽️ [Adding artifact links enables automation of work item creation and GitHub Copilot integration]()
179+
Alternatively, you can simply provide the branch, commit, pull request, or build identifiers directly, and the tool will automatically construct the required artifact URI for you.
180+
181+
For example:
182+
183+
```text
184+
Get me the list of pull requests for Constoso project and Frabrikam repo. Then link the first pull request to work item 12345.
185+
```
186+
187+
📽️ [Azure Devops MCP Server: Adding artifact links](https://youtu.be/t8HqEt8cZtY)

0 commit comments

Comments
 (0)