Exemplo n.º 1
0
        public async Task CommentOnPullRequestAsync(string pullRequestUrl, string message)
        {
            GitHubComment comment = new GitHubComment(message);

            string body = JsonConvert.SerializeObject(comment, _serializerSettings);

            var(owner, repo, id) = ParsePullRequestUri(pullRequestUrl);

            await this.ExecuteGitCommand(HttpMethod.Post, $"repos/{owner}/{repo}/issues/{id}/comments", _logger, body);
        }
Exemplo n.º 2
0
        public async Task CommentOnPullRequestAsync(string repoUri, int pullRequestId, string message)
        {
            GitHubComment comment = new GitHubComment(message);

            string body = JsonConvert.SerializeObject(comment, _serializerSettings);

            string ownerAndRepo = GetSegments(repoUri);

            await this.ExecuteGitCommand(HttpMethod.Post, $"repos/{ownerAndRepo}issues/{pullRequestId}/comments", _logger, body);
        }