public void process(Exchange exchange) throws Exception {
Integer pullRequestNumber = exchange.getIn().getHeader("GitHubPullRequest", Integer.class);
Integer inResponseTo = exchange.getIn().getHeader("GitHubInResponseTo", Integer.class);
String text = exchange.getIn().getBody(String.class);
Comment response;
if (inResponseTo != null && inResponseTo > 0) {
response = pullRequestService.replyToComment(getRepository(), pullRequestNumber, inResponseTo, text);
} else {
// Otherwise, just comment on the pull request itself.
response = issueService.createComment(getRepository(), pullRequestNumber, text);