| 1 | using AgentForge.Abstractions; |
| 2 | using AgentForge.Plugin.RepositoryImport.GitHub.Core; |
| 3 | using Microsoft.AspNetCore.Builder; |
| 4 | using Microsoft.Extensions.Configuration; |
| 5 | using Microsoft.Extensions.DependencyInjection; |
| 6 | |
| 7 | namespace AgentForge.Plugin.RepositoryImport.GitHub; |
| 8 | |
| 9 | public sealed class RepositoryImportGitHubForgePlugin : IForgePlugin |
| 10 | { |
| 11 | public string Id => "repository-import-org-github"; |
| 12 | |
| 13 | public string DisplayName => "GitHub organization repository import"; |
| 14 | |
| 15 | public string Tier => "extended"; |
| 16 | |
| 17 | public void ConfigureServices(IServiceCollection services, IConfiguration configuration) |
| 18 | { |
| 19 | services.AddGitHubImportCore(); |
| 20 | services.AddScoped<GitHubOrgRepositoryImporter>(); |
| 21 | services.AddScoped<GitHubSingleRepositoryImporter>(); |
| 22 | services.AddScoped<IForgeRepositoryImporter, GitHubOrgRepositoryImporter>(); |
| 23 | services.AddScoped<IForgeRepositoryImporter, GitHubSingleRepositoryImporter>(); |
| 24 | } |
| 25 | |
| 26 | public void MapEndpoints(WebApplication app) => ForgeRepositoryImportEndpoints.Map(app); |
| 27 | |
| 28 | public void RegisterFeatures(ForgeFeatureRegistry registry) => |
| 29 | registry.Add("repository_import_github"); |
| 30 | } |
| 31 | |
View only · write via MCP/CIDE