Пример #1
0
        private void TryCreateReview(AsapTask asapTask, Issue issue)
        {
            try
            {
                var review = _codeReview.CreateReview(asapTask.CommitId, issue.Key + " " + issue.Field.Summary, issue.URL, issue.Field.Summary, issue.Key);
                if (review != null)
                {
                    asapTask.FishEyeId = review.PermaId.Id;

                    UpdateTask(asapTask);
                }
            }
            catch (Exception e)
            {
                Debug.WriteLine(e.ToString());
            }
        }
Пример #2
0
 private void UpdateIfReviewComplete(AsapTask asapTask)
 {
     try
     {
         if (_codeReview.CountReviewers(asapTask.FishEyeId) >= MAXREVIEWS)
         {
             asapTask.ReviewFinished = true;
             UpdateTask(asapTask);
         }
     }
     catch(Exception e)
     {
         Debug.WriteLine(e.ToString());
     }
 }
Пример #3
0
 private void UpdateTask(AsapTask asapTask)
 {
     using (var repository = _repositoryFactory.NewRepository)
     {
         repository.Edit<AsapTask>(asapTask);
         repository.Save();
     }
 }
Пример #4
0
 private void SaveIssue()
 {
     var asapTask = new AsapTask();
     asapTask.JiraId = Issue.Key;
     asapTask.CommitId = _sourceControl.GetCommitId(Key);
     asapTask.ReviewFinished = false;
     using(var repository = _repositoryFactory.NewRepository)
     {
         repository.Add<AsapTask>(asapTask);
         repository.Save();
     }
 }