/** * The description body is part of the PullRequest object * * @return the description from github */ public String getDescription() { try { return getPullRequest().getBody(); } catch (IOException e) { return "UNKNOWN"; } }
public String getPullRequestBody(int requestNumber) throws IOException { return ghRepo.getPullRequest(requestNumber).getBody(); }
String pullRequestBody = remotePR.getBody().trim(); LOG.debug("Job: '{}', trigger event: '{}', body for test: '{}'", fullName,
private GHPullRequest getPullRequestWithPullReqIdentifier(GHRepository parent) throws IOException { List<GHPullRequest> pullRequests; GHUser myself; try { pullRequests = parent.getPullRequests(GHIssueState.OPEN); myself = gitHubUtil.getMyself(); } catch (IOException e) { log.warn("Error occurred while retrieving pull requests for {}", parent.getFullName()); return null; } for (GHPullRequest pullRequest : pullRequests) { GHUser user = pullRequest.getHead().getUser(); if (myself.equals(user) && pullRequest.getBody().equals(Constants.PULL_REQ_ID)) { return pullRequest; } } return null; } }
private GHPullRequest getPullRequestWithPullReqIdentifier(GHRepository parent) throws IOException { List<GHPullRequest> pullRequests; GHUser myself; try { pullRequests = parent.getPullRequests(GHIssueState.OPEN); myself = gitHubUtil.getMyself(); } catch (IOException e) { log.warn("Error occurred while retrieving pull requests for {}", parent.getFullName()); return null; } for (GHPullRequest pullRequest : pullRequests) { GHUser user = pullRequest.getHead().getUser(); if (myself.equals(user) && pullRequest.getBody().equals(Constants.PULL_REQ_ID)) { return pullRequest; } } return null; } }
new ObjectMetadataAction( pr.getTitle(), pr.getBody(), pr.getHtmlUrl().toExternalForm()
@Override public PullRequestStatus apply(GHPullRequest input) { int prID = GHUtils.prIdFrom(input.getDiffUrl().toString()); try { GHUser user = input.getUser(); return new PullRequestStatus(prID, input.getHead().getSha(), mergedSHA, input.getHead().getLabel(), input.getBase().getLabel(), input.getHtmlUrl().toString(), user.getName(), user.getEmail(), input.getBody(), input.getTitle()); } catch (IOException e) { throw new RuntimeException(e); } } };
body = pr.getBody();