public IEnumerable <EventRuleElement> GetRulesMatch(string collection, IEnumerable <EventRuleElement> eventRules)
        {
            var rules = eventRules.Where(r => collection.IsMatchOrNoPattern(r.TeamProjectCollection) &&
                                         ProjectName.IsMatchOrNoPattern(r.TeamProject) &&
                                         TeamNames.IsMatchOrNoPattern(r.TeamName) &&
                                         RepoName.IsMatchOrNoPattern(r.GitRepository));

            return(rules);
        }
        public override EventRuleElement GetRuleMatch(string collection, IEnumerable <EventRuleElement> eventRules)
        {
            var rule = eventRules.FirstOrDefault(r => r.Events.HasFlag(TfsEvents.Checkin) &&
                                                 collection.IsMatchOrNoPattern(r.TeamProjectCollection) &&
                                                 Projects.Keys.IsMatchOrNoPattern(r.TeamProject) &&
                                                 TeamNames.IsMatchOrNoPattern(r.TeamName) &&
                                                 SubmittedItems.IsMatchOrNoPattern(r.SourcePath));

            return(rule);
        }
예제 #3
0
        public override EventRuleElement GetRuleMatch(string collection, Configuration.EventRuleCollection eventRules)
        {
            var rule = eventRules.FirstOrDefault(r => r.Events.HasFlag(TfsEvents.PullRequestStatusUpdate) &&
                                                 collection.IsMatchOrNoPattern(r.TeamProjectCollection) &&
                                                 ProjectName.IsMatchOrNoPattern(r.TeamProject) &&
                                                 TeamNames.IsMatchOrNoPattern(r.TeamName) &&
                                                 RepoName.IsMatchOrNoPattern(r.GitRepository));

            return(rule);
        }
예제 #4
0
        public override EventRuleElement GetRuleMatch(string collection, IEnumerable <EventRuleElement> eventRules)
        {
            var rule = eventRules.FirstOrDefault(r => r.Events.HasFlag(TfsEvents.RepositoryCreated) &&
                                                 collection.IsMatchOrNoPattern(r.TeamProjectCollection) &&
                                                 ProjectName.IsMatchOrNoPattern(r.TeamProject) &&
                                                 TeamNames.IsMatchOrNoPattern(r.TeamName) &&
                                                 RepoName.IsMatchOrNoPattern(r.GitRepository));

            return(rule);
        }
예제 #5
0
        public IEnumerable <EventRuleElement> GetRulesMatch(string collection, IEnumerable <EventRuleElement> eventRules)
        {
            var rules = eventRules.Where(r => r.Events.HasFlag(TfsEvents.ReleaseCreated) &&
                                         collection.IsMatchOrNoPattern(r.TeamProjectCollection) &&
                                         ProjectName.IsMatchOrNoPattern(r.TeamProject) &&
                                         TeamNames.IsMatchOrNoPattern(r.TeamName) &&
                                         ReleaseDefinition.IsMatchOrNoPattern(r.ReleaseDefinition));

            return(rules);
        }
        public override EventRuleElement GetRuleMatch(string collection, IEnumerable <EventRuleElement> eventRules)
        {
            var rule = eventRules.FirstOrDefault(r => r.Events.HasFlag(TfsEvents.ChangesetComment) &&
                                                 collection.IsMatchOrNoPattern(r.TeamProjectCollection) &&
                                                 ProjectName.IsMatchOrNoPattern(r.TeamProject) &&
                                                 TeamNames.IsMatchOrNoPattern(r.TeamName) &&
                                                 SourcePath.IsMatchOrNoPattern(r.SourcePath) &&
                                                 Comment.IsMatchOrNoPattern(r.Text));

            return(rule);
        }
예제 #7
0
        public override EventRuleElement GetRuleMatch(string collection, IEnumerable <EventRuleElement> eventRules)
        {
            var rule = eventRules.FirstOrDefault(r => r.Events.HasFlag(TfsEvents.BuildCompleted) &&
                                                 (r.BuildStatuses & BuildStatus) != 0 &&
                                                 collection.IsMatchOrNoPattern(r.TeamProjectCollection) &&
                                                 ProjectName.IsMatchOrNoPattern(r.TeamProject) &&
                                                 TeamNames.IsMatchOrNoPattern(r.TeamName) &&
                                                 BuildDefinition.IsMatchOrNoPattern(r.BuildDefinition));

            return(rule);
        }
예제 #8
0
        public override EventRuleElement GetRuleMatch(string collection, Configuration.EventRuleCollection eventRules)
        {
            var rule = eventRules.FirstOrDefault(r => r.Events.HasFlag(TfsEvents.BuildQualityChanged) &&
                                                 (r.BuildStatuses & BuildStatus) != 0 &&
                                                 collection.IsMatchOrNoPattern(r.TeamProjectCollection) &&
                                                 ProjectName.IsMatchOrNoPattern(r.TeamProject) &&
                                                 TeamNames.IsMatchOrNoPattern(r.TeamName) &&
                                                 BuildDefinition.IsMatchOrNoPattern(r.BuildDefinition));

            return(rule);
        }
예제 #9
0
        public override EventRuleElement GetRuleMatch(string collection, IEnumerable <EventRuleElement> eventRules)
        {
            var rule = eventRules.FirstOrDefault(r =>
                                                 r.Events.HasFlag(TfsEvents.WorkItemComment) &&
                                                 collection.IsMatchOrNoPattern(r.TeamProjectCollection) &&
                                                 ProjectName.IsMatchOrNoPattern(r.TeamProject) &&
                                                 TeamNames.IsMatchOrNoPattern(r.TeamName) &&
                                                 WiType.IsMatchOrNoPattern(r.WorkItemType) &&
                                                 AreaPath.IsMatchOrNoPattern(r.AreaPath));

            return(rule);
        }
예제 #10
0
        public override EventRuleElement GetRuleMatch(string collection, IEnumerable <EventRuleElement> eventRules)
        {
            var rule = eventRules.FirstOrDefault(r =>
                                                 (r.Events.HasFlag(TfsEvents.WorkItemCreated) && IsNew ||
                                                  r.Events.HasFlag(TfsEvents.WorkItemChanged) && IsChangedFieldMatchOrNotSet(ChangedFields, r.WorkItemFieldItems)) &&
                                                 collection.IsMatchOrNoPattern(r.TeamProjectCollection) &&
                                                 ProjectName.IsMatchOrNoPattern(r.TeamProject) &&
                                                 TeamNames.IsMatchOrNoPattern(r.TeamName) &&
                                                 WiType.IsMatchOrNoPattern(r.WorkItemType) &&
                                                 AreaPath.IsMatchOrNoPattern(r.AreaPath));

            return(rule);
        }