Skip to content

Commit d44b27c

Browse files
committed
feat(vscode): add configuration files for Azure DevOps Migration Tools
fix(schema): update configuration schema with sourceFieldMappings and fixedTargetFields fix(tfsworkitemtypevalidatortool): enhance schema with sourceFieldMappings and fixedTargetFields fix(KeepOutboundLinkTargetProcessorOptions): set TargetLinksToKeepProject to a specific GUID
1 parent 04353ca commit d44b27c

File tree

7 files changed

+118
-11
lines changed

7 files changed

+118
-11
lines changed

.vscode/extensions.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"recommendations": [
3+
"ms-azuretools.vscode-azurefunctions",
4+
"ms-dotnettools.csharp"
5+
]
6+
}

.vscode/launch.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,20 @@
1717
"request": "launch",
1818
"preLaunchTask": "build full framework",
1919
"program": "${workspaceFolder}/src/MigrationTools.ConsoleFull/bin/Debug/net472/migration.exe",
20-
"args": ["execute", "-c", "configuration.json"],
20+
"args": [
21+
"execute",
22+
"-c",
23+
"configuration.json"
24+
],
2125
"cwd": "${workspaceFolder}/src/MigrationTools.ConsoleFull/bin/Debug/net472/",
2226
"console": "externalTerminal",
2327
"stopAtEntry": false
28+
},
29+
{
30+
"name": "Attach to .NET Functions",
31+
"type": "coreclr",
32+
"request": "attach",
33+
"processId": "${command:azureFunctions.pickProcess}"
2434
}
2535
]
2636
}

.vscode/settings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"azureFunctions.deploySubpath": "src\\MigrationTools.Telemetery/bin/Release/net8.0/publish",
3+
"azureFunctions.projectLanguage": "C#",
4+
"azureFunctions.projectRuntime": "~4",
5+
"debug.internalConsoleOptions": "neverOpen",
6+
"azureFunctions.preDeployTask": "publish (functions)"
7+
}

.vscode/tasks.json

Lines changed: 81 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,14 @@
2525
"/consoleloggerparameters:NoSummary"
2626
],
2727
"problemMatcher": "$msCompile"
28-
},
28+
},
2929
{
3030
"label": "build full framework",
3131
"dependsOrder": "sequence",
3232
"dependsOn": [
3333
"build only",
34-
"test only", "build docs"
34+
"test only",
35+
"build docs"
3536
],
3637
"group": {
3738
"kind": "build",
@@ -53,7 +54,6 @@
5354
"console;verbosity=normal",
5455
"--filter",
5556
"(TestCategory=L0|TestCategory=L1)"
56-
5757
],
5858
"group": "test",
5959
"presentation": {
@@ -71,12 +71,12 @@
7171
"/property:GenerateFullPaths=true",
7272
"/consoleloggerparameters:NoSummary"
7373
],
74-
"group": "build",
74+
"group": "build",
7575
"presentation": {
7676
"reveal": "silent"
7777
},
7878
"problemMatcher": "$msCompile"
79-
},
79+
},
8080
{
8181
"label": "build docs",
8282
"type": "shell",
@@ -87,6 +87,82 @@
8787
"panel": "new"
8888
},
8989
"problemMatcher": "$msCompile"
90+
},
91+
{
92+
"label": "clean (functions)",
93+
"command": "dotnet",
94+
"args": [
95+
"clean",
96+
"/property:GenerateFullPaths=true",
97+
"/consoleloggerparameters:NoSummary"
98+
],
99+
"type": "process",
100+
"problemMatcher": "$msCompile",
101+
"options": {
102+
"cwd": "${workspaceFolder}/src\\MigrationTools.Telemetery"
103+
}
104+
},
105+
{
106+
"label": "build (functions)",
107+
"command": "dotnet",
108+
"args": [
109+
"build",
110+
"/property:GenerateFullPaths=true",
111+
"/consoleloggerparameters:NoSummary"
112+
],
113+
"type": "process",
114+
"dependsOn": "clean (functions)",
115+
"group": {
116+
"kind": "build",
117+
"isDefault": true
118+
},
119+
"problemMatcher": "$msCompile",
120+
"options": {
121+
"cwd": "${workspaceFolder}/src\\MigrationTools.Telemetery"
122+
}
123+
},
124+
{
125+
"label": "clean release (functions)",
126+
"command": "dotnet",
127+
"args": [
128+
"clean",
129+
"--configuration",
130+
"Release",
131+
"/property:GenerateFullPaths=true",
132+
"/consoleloggerparameters:NoSummary"
133+
],
134+
"type": "process",
135+
"problemMatcher": "$msCompile",
136+
"options": {
137+
"cwd": "${workspaceFolder}/src\\MigrationTools.Telemetery"
138+
}
139+
},
140+
{
141+
"label": "publish (functions)",
142+
"command": "dotnet",
143+
"args": [
144+
"publish",
145+
"--configuration",
146+
"Release",
147+
"/property:GenerateFullPaths=true",
148+
"/consoleloggerparameters:NoSummary"
149+
],
150+
"type": "process",
151+
"dependsOn": "clean release (functions)",
152+
"problemMatcher": "$msCompile",
153+
"options": {
154+
"cwd": "${workspaceFolder}/src\\MigrationTools.Telemetery"
155+
}
156+
},
157+
{
158+
"type": "func",
159+
"dependsOn": "build (functions)",
160+
"options": {
161+
"cwd": "${workspaceFolder}/src\\MigrationTools.Telemetery/bin/Debug/net8.0"
162+
},
163+
"command": "host start",
164+
"isBackground": true,
165+
"problemMatcher": "$func-dotnet-watch"
90166
}
91167
]
92168
}

docs/static/schema/configuration.schema.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1826,13 +1826,17 @@
18261826
"description": "If set to `true` then the tool will run. Set to `false` and the processor will not run.",
18271827
"type": "boolean"
18281828
},
1829-
"fieldMappings": {
1830-
"description": "Field reference name mappings. Key is work item type name, value is dictionary of mapping source filed name to target field name. Target field name can be empty string to indicate that this field will not be validated in target. As work item type name, you can use * to define mappings which will be applied to all work item types.",
1829+
"fixedTargetFields": {
1830+
"description": "List of target fields, that are considered as fixed. It means, even if the field is different against source field, no warning will be triggered, jus information about the differences. Use this list, whan you know about the differences between fields, but resolved it for example by using . Key is target work item type name. As this name, you can use * to define fixed fields which will be applied to all work item types.",
18311831
"type": "object"
18321832
},
18331833
"includeWorkItemtypes": {
18341834
"description": "List of work item types which will be validated. If this list is empty, all work item types will be validated.",
18351835
"type": "array"
1836+
},
1837+
"sourceFieldMappings": {
1838+
"description": "Field reference name mappings. Key is work item type name, value is dictionary of mapping source filed name to target field name. Target field name can be empty string to indicate that this field will not be validated in target. As work item type name, you can use * to define mappings which will be applied to all work item types.",
1839+
"type": "object"
18361840
}
18371841
}
18381842
},

docs/static/schema/schema.tools.tfsworkitemtypevalidatortool.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,17 @@
99
"description": "If set to `true` then the tool will run. Set to `false` and the processor will not run.",
1010
"type": "boolean"
1111
},
12-
"fieldMappings": {
13-
"description": "Field reference name mappings. Key is work item type name, value is dictionary of mapping source filed name to target field name. Target field name can be empty string to indicate that this field will not be validated in target. As work item type name, you can use * to define mappings which will be applied to all work item types.",
12+
"fixedTargetFields": {
13+
"description": "List of target fields, that are considered as fixed. It means, even if the field is different against source field, no warning will be triggered, jus information about the differences. Use this list, whan you know about the differences between fields, but resolved it for example by using . Key is target work item type name. As this name, you can use * to define fixed fields which will be applied to all work item types.",
1414
"type": "object"
1515
},
1616
"includeWorkItemtypes": {
1717
"description": "List of work item types which will be validated. If this list is empty, all work item types will be validated.",
1818
"type": "array"
19+
},
20+
"sourceFieldMappings": {
21+
"description": "Field reference name mappings. Key is work item type name, value is dictionary of mapping source filed name to target field name. Target field name can be empty string to indicate that this field will not be validated in target. As work item type name, you can use * to define mappings which will be applied to all work item types.",
22+
"type": "object"
1923
}
2024
}
2125
}

src/MigrationTools.Clients.AzureDevops.Rest/Processors/KeepOutboundLinkTargetProcessorOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public KeepOutboundLinkTargetProcessorOptions()
1717
{
1818
WIQLQuery = "Select [System.Id] From WorkItems Where [System.TeamProject] = @project and not [System.WorkItemType] contains 'Test Suite, Test Plan,Shared Steps,Shared Parameter,Feedback Request'";
1919
TargetLinksToKeepOrganization = "https://dev.azure.com/nkdagility";
20-
TargetLinksToKeepProject = Guid.NewGuid().ToString();
20+
TargetLinksToKeepProject = "950311ea-ec93-4bf3-be62-de5e7eaff847";
2121
DryRun = true;
2222
CleanupFileName = "c:/temp/OutboundLinkTargets.bat";
2323
PrependCommand = "start";

0 commit comments

Comments
 (0)