public static string Execute(ChangeList cl) { var sum = 0; var res = ""; foreach (var author in authors) { //var one = 0; foreach (var rule in rules) { var result = rule.Execute(author, cl); if (result == 999) { return author; } //one += result; } return String.Empty; //if (one > sum) //{ // sum = one; // res = author; //} } return res; }
public int Execute(string author, ChangeList cl) { if (author == "teamcitybuilder" && cl.Description == "pbmgr:") { return 999; } return 0; }
public int Execute(string author, ChangeList cl) { AuthorDTO authorDto; if (!data.TryGetValue(author, out authorDto)) return 0; var year = cl.Date.Year; CommitDTO values; if (!authorDto.Commits.TryGetValue(year, out values)) return 0; var hour = cl.Date.Hour; var chance = 100 * values.Hourly[hour] / values.All; return chance; }