Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Post comment content on pull requests #108

Open
Zomis opened this issue Sep 28, 2015 · 2 comments
Open

Post comment content on pull requests #108

Zomis opened this issue Sep 28, 2015 · 2 comments

Comments

@Zomis
Copy link
Owner

Zomis commented Sep 28, 2015

HookStringification.groovy:

void pull_request_review_comment(List<String> result, def json) {
    result << format(json, "%repository% %sender% [commented on **$json.comment.path**]($json.comment.html_url) of pull request ${issue(json.pull_request)}");
}

This does not post the content of the comment, only that there is a comment.

Compare with:

void issue_comment(List<String> result, def json) {
    String issue = issue(json.issue)
    String commentTarget = (json.issue.pull_request == null) ? "issue" : "pull request";
    result << format(json, "%repository% %sender% [commented]($json.comment.html_url) on $commentTarget $issue");
    result.add('> ' + truncate(json.comment.body))
    stats.addIssueComment(json.repository)
}
@Zomis
Copy link
Owner Author

Zomis commented Feb 8, 2016

It seems like comment content are included: http://chat.stackexchange.com/transcript/message/27428181#27428181 . Perhaps pull_request_review_comment only occurs when using the Github API and not when using the webhooks?

@Zomis
Copy link
Owner Author

Zomis commented Feb 8, 2016

According to Mug, when used as a webhook it is X-GitHub-Event: issue_comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant