Exemplo n.º 1
0
        public override void Configure(MergePolicyConfiguration configuration)
        {
            if (string.IsNullOrEmpty(configuration.Target))
            {
                throw new ArgumentException("Target branch cannot be null");
            }

            _defaultBranch  = GitBranch.Canonize(configuration.Target);
            _branchComparer = new ReleaseAndDefaultBranchComparer(_defaultBranch);
            _repositoryId   = configuration.RepositoryId;
        }
        public override void Configure(MergePolicyConfiguration configuration)
        {
            if (string.IsNullOrEmpty(configuration.Source))
            {
                throw new ArgumentException("Source cannot be empty");
            }

            if (string.IsNullOrEmpty(configuration.Target))
            {
                throw new ArgumentException("Target cannot be empty");
            }

            _repositoryId = configuration.RepositoryId;
            _sourceBranch = GitBranch.Canonize(configuration.Source);
            _targetBranch = GitBranch.Canonize(configuration.Target);
        }