コード例 #1
0
 private static void RemoveLastComma(IssueViewModel issueView)
 {
     if (!string.IsNullOrEmpty(issueView.Category))
     {
         var lastComma = issueView.Category.Length - 1;
         issueView.Category = issueView.Category.Substring(0, lastComma);
     }
 }
コード例 #2
0
 private IssueViewModel ConvertToIssueViewModel(GithubIssue openIssue)
 {
     var issueView = new IssueViewModel();
     issueView.IssueId = openIssue.Id;
     issueView.Number = openIssue.Number;
     issueView.IssueLinkUrl = openIssue.Html_Url;
     foreach (var label in openIssue.Labels)
     {
         if (!_packageTags.Contains(label.Name))
             issueView.Category += label.Name + ",";
     }
     RemoveLastComma(issueView);
     issueView.Description = openIssue.Title;
     issueView.User = openIssue.User;
     return issueView;
 }