Exemplo n.º 1
0
        protected override void ProcessMatch(System.Text.RegularExpressions.Match match, Models.ChatMessage message, Bot bot)
        {
            var client = new NGitHub.GitHubClient();
            var org = new NGitHub.Services.OrganizationService(client);

            org.GetMembersAsync("NuGet",
                members => {
                    bot.Say(string.Format("@{0}, Here are the people listed on github as part of the NuGet team. {1}. Why not get involved yourself? http://docs.nuget.org/docs/contribute/contributing-to-nuget",
                        message.FromUser, String.Join(", ", members.Select(m => String.Format("{0} ({1})", m.Name, m.Login)))), message.Room);
                },
                e =>
                {
                    bot.Say(String.Format("I'm affriad I can't do that {0}. {1}", message.FromUser, e.ToString()), message.Room);
                });
        }
Exemplo n.º 2
0
        protected override void ProcessMatch(System.Text.RegularExpressions.Match match, Models.ChatMessage message, Bot bot)
        {
            var client = new NGitHub.GitHubClient();
            var org    = new NGitHub.Services.OrganizationService(client);

            org.GetMembersAsync("NuGet",
                                members => {
                bot.Say(string.Format("@{0}, Here are the people listed on github as part of the NuGet team. {1}. Why not get involved yourself? http://docs.nuget.org/docs/contribute/contributing-to-nuget",
                                      message.FromUser, String.Join(", ", members.Select(m => String.Format("{0} ({1})", m.Name, m.Login)))), message.Room);
            },
                                e =>
            {
                bot.Say(String.Format("I'm affriad I can't do that {0}. {1}", message.FromUser, e.ToString()), message.Room);
            });
        }
Exemplo n.º 3
0
 protected override void ProcessMatch(Match match, ChatMessage message, Bot bot)
 {
     NGitHub.GitHubClient client = new NGitHub.GitHubClient();
     client.Issues.GetIssuesAsync("nuget", match.Groups[2].Value, NGitHub.Models.State.Open,
                                  issues =>
     {
         string issueCount = "";
         if (issues.Any())
         {
             issueCount = "@{0}, {1} has {2} issues.";
         }
         else
         {
             issueCount = "@{0}, {1} has no issues, this has to be wrong. I know that code isn't perfect.";
         }
         bot.Say(string.Format(issueCount, message.FromUser, match.Groups[2], issues.Count()), message.Room);
     },
                                  e =>
     {
         bot.Say(String.Format("I'm affriad I can't do that {0}. {1}", message.FromUser, e.ToString()), message.Room);
     });
 }
Exemplo n.º 4
0
 protected override void ProcessMatch(Match match, ChatMessage message, Bot bot)
 {
     NGitHub.GitHubClient client = new NGitHub.GitHubClient();
     client.Issues.GetIssuesAsync("nuget", match.Groups[2].Value, NGitHub.Models.State.Open,
         issues =>
         {
             string issueCount = "";
             if (issues.Any())
             {
                 issueCount = "@{0}, {1} has {2} issues.";
             }
             else
             {
                 issueCount = "@{0}, {1} has no issues, this has to be wrong. I know that code isn't perfect.";
             }
             bot.Say(string.Format(issueCount, message.FromUser, match.Groups[2], issues.Count()), message.Room);
         },
         e =>
         {
             bot.Say(String.Format("I'm affriad I can't do that {0}. {1}", message.FromUser, e.ToString()), message.Room);
         });
 }