Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Release Plan Creation Process
You goal is to create a valid release plan. You must prompt user to provide all required information and all input must match the format and requirement mentioned in step 3 below.
Comment thread
smw-ms marked this conversation as resolved.
Outdated

> **Important Note**
Comment thread
maririos marked this conversation as resolved.
Outdated
> Do **not** ask the user to manually edit the DevOps work item.
> To update a release plan manually, the user must use the [Release Planner Tool](https://apps.powerapps.com/play/e/ed2ffefd-774d-40dd-ab23-7fff01aeec9f/a/821ab569-ae60-420d-8264-d7b5d5ef734c?tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47).
Comment thread
smw-ms marked this conversation as resolved.
Outdated

Follow these steps in order to create or manage a release plan for an API specification pull request:

## Step 1: Validate Prerequisites
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ public async Task Test_Create_releasePlan_with_valid_inputs()
var testCodeFilePath = "TypeSpecTestData/specification/testcontoso/Contoso.Management";
var releaseplan = await releasePlanTool.CreateReleasePlan(testCodeFilePath, "July 2025", "12345678-1234-5678-9012-123456789012", "12345678-1234-5678-9012-123456789012", "2025-01-01", "https://github.com/Azure/azure-rest-api-specs/pull/35446", "beta", isTestReleasePlan: true);
Assert.IsNotNull(releaseplan);
Assert.True(releaseplan.Contains("Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models.WorkItem"));
Assert.True(releaseplan.Contains("Azure.Sdk.Tools.Cli.Models.ReleasePlanDetails"));

releaseplan = await releasePlanTool.CreateReleasePlan(testCodeFilePath, "July 2025", "12345678-1234-5678-9012-123456789012", "12345678-1234-5678-9012-123456789012", "2025-01-01-preview", "https://github.com/Azure/azure-rest-api-specs/pull/35446", "beta", isTestReleasePlan: true);
Assert.IsNotNull(releaseplan);
Assert.True(releaseplan.Contains("Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models.WorkItem"));
Assert.True(releaseplan.Contains("Azure.Sdk.Tools.Cli.Models.ReleasePlanDetails"));
}

[Test]
Expand Down Expand Up @@ -136,7 +136,7 @@ public async Task Test_Create_releasePlan_with_AZSDKTOOLS_AGENT_TESTING_true_cre

// Assert
Assert.IsNotNull(releaseplan);
Assert.True(releaseplan.Contains("Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models.WorkItem"));
Assert.True(releaseplan.Contains("Azure.Sdk.Tools.Cli.Models.ReleasePlanDetails"));

// Verify the environment helper was called
environmentHelperMock.Verify(x => x.GetBooleanVariable("AZSDKTOOLS_AGENT_TESTING", false), Times.Once);
Expand Down Expand Up @@ -173,7 +173,7 @@ public async Task Test_Create_releasePlan_with_AZSDKTOOLS_AGENT_TESTING_false_re

// Assert
Assert.IsNotNull(releaseplan);
Assert.True(releaseplan.Contains("Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models.WorkItem"));
Assert.True(releaseplan.Contains("Azure.Sdk.Tools.Cli.Models.ReleasePlanDetails"));

// Verify the environment helper was called
environmentHelperMock.Verify(x => x.GetBooleanVariable("AZSDKTOOLS_AGENT_TESTING", false), Times.Once);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,22 @@ public async Task<string> CreateReleasePlan(string typeSpecProjectPath, string t
}
else
{
return output.Format(workItem);
if (workItem.Id is int workItemId)
Comment thread
maririos marked this conversation as resolved.
{
releasePlan.WorkItemId = workItemId;
}

if (workItem.Fields.TryGetValue("Custom.ReleasePlanId", out var value) && value is int releasePlanId)
{
releasePlan.ReleasePlanId = releasePlanId;
}

if (workItem.Fields.TryGetValue("Custom.ReleasePlanLink", out value) && value is string releasePlanLink)
Comment thread
smw-ms marked this conversation as resolved.
{
releasePlan.ReleasePlanLink = releasePlanLink;
}

return output.Format(releasePlan);
Comment thread
maririos marked this conversation as resolved.
Outdated
}
}
catch (Exception ex)
Expand Down
Loading