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.RepositoryCreated) && collection.IsMatchOrNoPattern(r.TeamProjectCollection) && ProjectName.IsMatchOrNoPattern(r.TeamProject) && TeamNames.IsMatchOrNoPattern(r.TeamName) && RepoName.IsMatchOrNoPattern(r.GitRepository)); return(rule); }
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) && TargetBranch.Name.IsMatchOrNoPattern(r.GitBranch)); return(rules); }
public override EventRuleElement GetRuleMatch(string collection, Configuration.EventRuleCollection eventRules) { var rule = eventRules.FirstOrDefault(r => r.Events.HasFlag(TfsEvents.PullRequestCreated) && collection.IsMatchOrNoPattern(r.TeamProjectCollection) && ProjectName.IsMatchOrNoPattern(r.TeamProject) && TeamNames.IsMatchOrNoPattern(r.TeamName) && RepoName.IsMatchOrNoPattern(r.GitRepository)); return(rule); }
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); }
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); }
public override EventRuleElement GetRuleMatch(string collection, Configuration.EventRuleCollection eventRules) { var rule = eventRules.FirstOrDefault(r => r.Events.HasFlag(TfsEvents.WorkItemComment) && collection.IsMatchOrNoPattern(r.TeamProjectCollection) && ProjectName.IsMatchOrNoPattern(r.TeamProject) && WiType.IsMatchOrNoPattern(r.WorkItemType) && AreaPath.IsMatchOrNoPattern(r.AreaPath)); return(rule); }
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); }
public override EventRuleElement GetRuleMatch(string collection, Configuration.EventRuleCollection 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) && WiType.IsMatchOrNoPattern(r.WorkItemType) && AreaPath.IsMatchOrNoPattern(r.AreaPath)); return(rule); }
public override bool IsMatch(string collection, Configuration.EventRuleCollection eventRules) { var rule = eventRules.FirstOrDefault(r => r.Events.HasFlag(TfsEvents.PullRequestCreated) && collection.IsMatchOrNoPattern(r.TeamProjectCollection) && ProjectName.IsMatchOrNoPattern(r.TeamProject) && RepoName.IsMatchOrNoPattern(r.GitRepository)); if (rule != null) { return(rule.Notify); } return(false); }
public override bool IsMatch(string collection, Configuration.EventRuleCollection eventRules) { foreach (var rule in eventRules) { if (rule.Events.HasFlag(TfsEvents.BuildQualityChanged) && collection.IsMatchOrNoPattern(rule.TeamProjectCollection) && ProjectName.IsMatchOrNoPattern(rule.TeamProject) && BuildDefinition.IsMatchOrNoPattern(rule.BuildDefinition)) { return(rule.Notify); } } return(false); }
public override bool IsMatch(string collection, Configuration.EventRuleCollection eventRules) { var rule = eventRules.FirstOrDefault(r => (r.Events.HasFlag(TfsEvents.WorkItemStateChange) && IsStateChanged || r.Events.HasFlag(TfsEvents.WorkItemAssignmentChange) && IsAssignmentChanged) && collection.IsMatchOrNoPattern(r.TeamProjectCollection) && ProjectName.IsMatchOrNoPattern(r.TeamProject)); if (rule != null) { return(rule.Notify); } return(false); }
public override bool IsMatch(string collection, Configuration.EventRuleCollection eventRules) { foreach (var rule in eventRules) { if (BuildStatus.HasFlag(BuildStatus.Succeeded) && rule.Events.HasFlag(TfsEvents.BuildSucceeded) || BuildStatus.HasFlag(BuildStatus.Failed) && rule.Events.HasFlag(TfsEvents.BuildFailed)) { if (collection.IsMatchOrNoPattern(rule.TeamProjectCollection) && ProjectName.IsMatchOrNoPattern(rule.TeamProject) && BuildDefinition.IsMatchOrNoPattern(rule.BuildDefinition)) { return(rule.Notify); } } } return(false); }