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()); } }
private void UpdateIfReviewComplete(AsapTask asapTask) { try { if (_codeReview.CountReviewers(asapTask.FishEyeId) >= MAXREVIEWS) { asapTask.ReviewFinished = true; UpdateTask(asapTask); } } catch(Exception e) { Debug.WriteLine(e.ToString()); } }
private void UpdateTask(AsapTask asapTask) { using (var repository = _repositoryFactory.NewRepository) { repository.Edit<AsapTask>(asapTask); repository.Save(); } }
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(); } }