Skip to content
This repository was archived by the owner on Jul 21, 2025. It is now read-only.

Commit 85b1f0c

Browse files
Merge pull request #50 from microsoft/templateextractor
Template-extractor
2 parents 457cfa3 + 742543b commit 85b1f0c

14 files changed

Lines changed: 2569 additions & 195 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,3 +151,4 @@ UpgradeLog.htm
151151
/src/AzureDevOpsDemoBuilder/log
152152
/src/AzureDevOpsDemoBuilder/Appsettings.Development.json
153153
/src/AzureDevOpsDemoBuilder/appsettings.json
154+
/src/ADOGenerator/ExtractedTemplate

src/ADOGenerator/ADOGenerator.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
<ItemGroup>
1111
<Compile Remove="IServices\IConfiguration.cs" />
12+
<Compile Remove="Models\Configuration.cs" />
1213
</ItemGroup>
1314
<ItemGroup>
1415
<!-- Include the files you want to copy -->
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
using ADOGenerator.Models;
2+
using RestAPI;
3+
using System;
4+
using System.Collections.Generic;
5+
using System.Linq;
6+
using System.Text;
7+
using System.Threading.Tasks;
8+
9+
namespace ADOGenerator.IServices
10+
{
11+
public interface IExtractorService
12+
{
13+
ProjectConfigurations ProjectConfiguration(Project model);
14+
int GetTeamsCount(ProjectConfigurations appConfig);
15+
int GetIterationsCount(ProjectConfigurations appConfig);
16+
int GetBuildDefinitionCount(ProjectConfigurations appConfig);
17+
int GetReleaseDefinitionCount(ProjectConfigurations appConfig);
18+
string[] GenerateTemplateArifacts(Project model);
19+
Dictionary<string, int> GetWorkItemsCount(ProjectConfigurations appConfig);
20+
List<RequiredExtensions.ExtensionWithLink> GetInstalledExtensions(ProjectConfigurations appConfig, string extractedFolderName);
21+
void ExportQuries(ProjectConfigurations appConfig, string extractedFolderName);
22+
bool ExportTeams(RestAPI.ADOConfiguration con, Project model, string extractedFolderName);
23+
bool ExportIterations(ProjectConfigurations appConfig, string extractedFolderName);
24+
bool ExportWorkItems(ProjectConfigurations appConfig, string extractedFolderName);
25+
bool ExportRepositoryList(ProjectConfigurations appConfig, string extractedFolderName);
26+
int GetBuildDefinitions(ProjectConfigurations appConfig, string extractedFolderName);
27+
int GeneralizingGetReleaseDefinitions(ProjectConfigurations appConfig, string extractedFolderName);
28+
void GetServiceEndpoints(ProjectConfigurations appConfig, string extractedFolderName);
29+
bool ExportDeliveryPlans(ProjectConfigurations appConfig, string extractedFolderName);
30+
bool IsTemplateExists(string templateName);
31+
}
32+
}

src/ADOGenerator/IServices/IProjectService.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ public interface IProjectService
1717
public bool InstallExtensions(Project model, string accountName, string PAT);
1818

1919
public bool WhereDoseTemplateBelongTo(string templatName);
20+
public HttpResponseMessage GetProjects(string accname, string pat, string authScheme);
21+
22+
public Task<List<string>> SelectProject(string accessToken, HttpResponseMessage projectsData);
2023

2124
}
2225
}
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
namespace ADOGenerator.IServices
1+
using ADOGenerator.Models;
2+
3+
namespace ADOGenerator.IServices
24
{
35
public interface ITemplateService
46
{
7+
bool AnalyzeProject(Project model);
8+
bool CheckTemplateExists(Project model);
9+
(bool,string,string) GenerateTemplateArtifacts(Project model);
510
}
611
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
7+
namespace ADOGenerator.Models
8+
{
9+
internal class ExtractorAnalysis
10+
{
11+
public int teamCount { get; set; }
12+
public int IterationCount { get; set; }
13+
public int BuildDefCount { get; set; }
14+
public int ReleaseDefCount { get; set; }
15+
public Dictionary<string, int> WorkItemCounts { get; set; }
16+
public List<string> ErrorMessages { get; set; }
17+
}
18+
}

0 commit comments

Comments
 (0)