Ejemplo n.º 1
0
        protected override async System.Threading.Tasks.Task Save()
        {
            var req     = new Octokit.PullRequestReviewCommentCreate(Text, null, null, 0);
            var comment = await _applicationService.GitHubClient.PullRequest.Comment.Create(RepositoryOwner, RepositoryName, Id, req);

            _commendAdded.OnNext(comment);
        }
Ejemplo n.º 2
0
 private void ShowCommentComposer(int line)
 {
     ShowComposer(async text =>
     {
         var commentOptions = new Octokit.PullRequestReviewCommentCreate(text, _commit, _path, line);
         var comment        = await _applicationService.GitHubClient.PullRequest.ReviewComment.Create(
             _username, _repository, _pullRequestId, commentOptions);
         _comments.Add(comment);
     });
 }
Ejemplo n.º 3
0
        public PullRequestCommentViewModel(IApplicationService applicationService)
        {
            Title       = "Add Comment";
            SaveCommand = ReactiveCommand.CreateAsyncTask(
                this.WhenAnyValue(x => x.Text).Select(x => !string.IsNullOrEmpty(x)),
                t =>
            {
                var req = new Octokit.PullRequestReviewCommentCreate(Text, null, null, 0);
                return(applicationService.GitHubClient.PullRequest.Comment.Create(RepositoryOwner, RepositoryName, Id, req));
            });

            SaveCommand.Subscribe(x => Dismiss());
        }