Ejemplo n.º 1
0
        public AzurePipelinesMirror(
            MirrorViaConfig config,
            IRepositorySource repositorySource,
            ILogger log)
            : base(config.Type, config.AccessToken)
        {
            _config           = config;
            _repositorySource = repositorySource;
            _log = log;

            if (DevOpsProject == null)
            {
                throw new NotSupportedException("Mirror must be set up in a specific project and does not support organization level!");
            }
        }
 public IMirrorService GetMirrorService(MirrorViaConfig mirrorConfig, IRepositorySource source)
 => new Uri(mirrorConfig.Type).Host.ToLowerInvariant() switch
 {
     "dev.azure.com" => new AzurePipelinesMirror(mirrorConfig, source, _log),