Exemple #1
0
        private async Task ProxyCommits()
        {
            Logger.Info("Proxying commits...");

            foreach (var branch in _config.Source.Branches)
            {
                await PullSrcRepo(branch);
            }

            await AsyncDirectory.Copy("srcRepo", "destRepo");

            if (_config.Destination.Anonymize)
            {
                await AnonymizeDestRepo();
            }
            using (var destRepo = new GitRepository("destRepo"))
            {
                destRepo.Network.Remotes.Add("proxy", _ghDest.CloneUrl);
            }

            foreach (var branch in _config.Source.Branches)
            {
                await PushDestRepo(branch);
            }
        }
Exemple #2
0
        public async Task <IEnumerable <string> > GetFileList()
        {
            var extHash = new HashSet <string>(_extensions, StringComparer.CurrentCultureIgnoreCase);

            IEnumerable <string> allfiles = await AsyncDirectory.EnumerateFiles(_rootFolderPath, SearchOption.AllDirectories);

            IEnumerable <string> files = allfiles.Where(f => extHash.Contains(Path.GetExtension(f)));

            return(files);
        }