@azure-devops/mcp 2.1.0-nightly.20250915 → 2.1.0-nightly.20250917
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tools/wiki.js +4 -3
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/tools/wiki.js
CHANGED
|
@@ -176,17 +176,18 @@ function configureWikiTools(server, tokenProvider, connectionProvider) {
|
|
|
176
176
|
content: z.string().describe("The content of the wiki page in markdown format."),
|
|
177
177
|
project: z.string().optional().describe("The project name or ID where the wiki is located. If not provided, the default project will be used."),
|
|
178
178
|
etag: z.string().optional().describe("ETag for editing existing pages (optional, will be fetched if not provided)."),
|
|
179
|
-
|
|
179
|
+
branch: z.string().default("wikiMaster").describe("The branch name for the wiki repository. Defaults to 'wikiMaster' which is the default branch for Azure DevOps wikis."),
|
|
180
|
+
}, async ({ wikiIdentifier, path, content, project, etag, branch = "wikiMaster" }) => {
|
|
180
181
|
try {
|
|
181
182
|
const connection = await connectionProvider();
|
|
182
183
|
const accessToken = await tokenProvider();
|
|
183
184
|
// Normalize the path
|
|
184
185
|
const normalizedPath = path.startsWith("/") ? path : `/${path}`;
|
|
185
186
|
const encodedPath = encodeURIComponent(normalizedPath);
|
|
186
|
-
// Build the URL for the wiki page API
|
|
187
|
+
// Build the URL for the wiki page API with version descriptor
|
|
187
188
|
const baseUrl = connection.serverUrl;
|
|
188
189
|
const projectParam = project || "";
|
|
189
|
-
const url = `${baseUrl}/${projectParam}/_apis/wiki/wikis/${wikiIdentifier}/pages?path=${encodedPath}&api-version=7.1`;
|
|
190
|
+
const url = `${baseUrl}/${projectParam}/_apis/wiki/wikis/${wikiIdentifier}/pages?path=${encodedPath}&versionDescriptor.versionType=branch&versionDescriptor.version=${encodeURIComponent(branch)}&api-version=7.1`;
|
|
190
191
|
// First, try to create a new page (PUT without ETag)
|
|
191
192
|
try {
|
|
192
193
|
const createResponse = await fetch(url, {
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const packageVersion = "2.1.0-nightly.
|
|
1
|
+
export const packageVersion = "2.1.0-nightly.20250917";
|