Skip to content

Template-extractor #50

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,4 @@ UpgradeLog.htm
/src/AzureDevOpsDemoBuilder/log
/src/AzureDevOpsDemoBuilder/Appsettings.Development.json
/src/AzureDevOpsDemoBuilder/appsettings.json
/src/ADOGenerator/ExtractedTemplate
1 change: 1 addition & 0 deletions src/ADOGenerator/ADOGenerator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

<ItemGroup>
<Compile Remove="IServices\IConfiguration.cs" />
<Compile Remove="Models\Configuration.cs" />
</ItemGroup>
<ItemGroup>
<!-- Include the files you want to copy -->
Expand Down
32 changes: 32 additions & 0 deletions src/ADOGenerator/IServices/IExtractorService.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
using ADOGenerator.Models;
using RestAPI;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ADOGenerator.IServices
{
public interface IExtractorService
{
ProjectConfigurations ProjectConfiguration(Project model);
int GetTeamsCount(ProjectConfigurations appConfig);
int GetIterationsCount(ProjectConfigurations appConfig);
int GetBuildDefinitionCount(ProjectConfigurations appConfig);
int GetReleaseDefinitionCount(ProjectConfigurations appConfig);
string[] GenerateTemplateArifacts(Project model);
Dictionary<string, int> GetWorkItemsCount(ProjectConfigurations appConfig);
List<RequiredExtensions.ExtensionWithLink> GetInstalledExtensions(ProjectConfigurations appConfig, string extractedFolderName);
void ExportQuries(ProjectConfigurations appConfig, string extractedFolderName);
bool ExportTeams(RestAPI.ADOConfiguration con, Project model, string extractedFolderName);
bool ExportIterations(ProjectConfigurations appConfig, string extractedFolderName);
bool ExportWorkItems(ProjectConfigurations appConfig, string extractedFolderName);
bool ExportRepositoryList(ProjectConfigurations appConfig, string extractedFolderName);
int GetBuildDefinitions(ProjectConfigurations appConfig, string extractedFolderName);
int GeneralizingGetReleaseDefinitions(ProjectConfigurations appConfig, string extractedFolderName);
void GetServiceEndpoints(ProjectConfigurations appConfig, string extractedFolderName);
bool ExportDeliveryPlans(ProjectConfigurations appConfig, string extractedFolderName);
bool IsTemplateExists(string templateName);
}
}
3 changes: 3 additions & 0 deletions src/ADOGenerator/IServices/IProjectService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ public interface IProjectService
public bool InstallExtensions(Project model, string accountName, string PAT);

public bool WhereDoseTemplateBelongTo(string templatName);
public HttpResponseMessage GetProjects(string accname, string pat, string authScheme);

public Task<List<string>> SelectProject(string accessToken, HttpResponseMessage projectsData);

}
}
7 changes: 6 additions & 1 deletion src/ADOGenerator/IServices/ITemplateService.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
namespace ADOGenerator.IServices
using ADOGenerator.Models;

namespace ADOGenerator.IServices
{
public interface ITemplateService
{
bool AnalyzeProject(Project model);
bool CheckTemplateExists(Project model);
(bool,string,string) GenerateTemplateArtifacts(Project model);
}
}
18 changes: 18 additions & 0 deletions src/ADOGenerator/Models/ExtractorAnalysis.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ADOGenerator.Models
{
internal class ExtractorAnalysis
{
public int teamCount { get; set; }
public int IterationCount { get; set; }
public int BuildDefCount { get; set; }
public int ReleaseDefCount { get; set; }
public Dictionary<string, int> WorkItemCounts { get; set; }
public List<string> ErrorMessages { get; set; }
}
}
Loading
Loading