public class PullRequest extends Object
| Constructor and Description |
|---|
PullRequest(String id,
URL url,
Repository repository,
Codebase codebase,
PullRequestState state,
String title,
String body,
boolean mergeable,
boolean merged,
MergeableState mergeableState,
Date mergedAt)
Deprecated.
|
PullRequest(String id,
URL url,
Repository repository,
Codebase codebase,
PullRequestState state,
String title,
String body,
boolean mergeable,
boolean merged,
MergeableState mergeableState,
Date mergedAt,
List<String> commits) |
PullRequest(String id,
URL url,
Repository repository,
Codebase codebase,
PullRequestState state,
String title,
String body,
boolean mergeable,
boolean merged,
MergeableState mergeableState,
Date mergedAt,
List<String> commits,
PullRequestHome prHome) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addComment(String comment) |
boolean |
addLabel(Label label) |
void |
approveOnPullRequest() |
boolean |
equals(Object o) |
List<URL> |
findDependencyPullRequestsURL()
Searches PR body for links of related issues.
|
URL |
findIssueURL()
Searches PR body for link to related issue.
|
PullRequestUpgrade |
findPullRequestUpgrade()
Deprecated.
- upgrade handling in processor wasnt green lit. Should be safe to remove.
|
List<PullRequest> |
findReferencedPullRequests() |
List<URL> |
findRelatedIssuesURL()
Searches PR body for links of related issues.
|
URL |
findUpstreamIssueURL()
Searches PR body for link to upstream issue.
|
URL |
findUpstreamPullRequestURL()
Searches PR body for link to upstream PR.
|
String |
getBody() |
Codebase |
getCodebase() |
List<String> |
getCommits()
Return list of commits for this PR - youngest at the start, oldest( first ) at the end.
|
CommitStatus |
getCommitStatus() |
String |
getId() |
List<Label> |
getLabels() |
MergeableState |
getMergableState() |
Date |
getMergedAt() |
Repository |
getRepository() |
PullRequestState |
getState() |
String |
getTitle() |
URL |
getURL() |
boolean |
hasDependencies() |
int |
hashCode() |
boolean |
hasUpgrade() |
boolean |
hasUpgradeMeta()
Deprecated.
|
boolean |
isMergeable() |
boolean |
isMerged() |
boolean |
isUpgrade() |
boolean |
isUpstreamRequired()
Checks if PR body contains indication that upstream work is not required.
|
boolean |
removeLabel(Label label) |
void |
requestChangesOnPullRequest(String comment) |
void |
setBody(String body) |
boolean |
setLabels(List<Label> labels) |
void |
setRepository(Repository repository) |
void |
setState(PullRequestState state) |
void |
setTitle(String title) |
String |
toString() |
public PullRequest(String id, URL url, Repository repository, Codebase codebase, PullRequestState state, String title, String body, boolean mergeable, boolean merged, MergeableState mergeableState, Date mergedAt)
id - url - repository - codebase - state - title - body - mergeable - merged - mergeableState - mergedAt - public PullRequest(String id, URL url, Repository repository, Codebase codebase, PullRequestState state, String title, String body, boolean mergeable, boolean merged, MergeableState mergeableState, Date mergedAt, List<String> commits)
public PullRequest(String id, URL url, Repository repository, Codebase codebase, PullRequestState state, String title, String body, boolean mergeable, boolean merged, MergeableState mergeableState, Date mergedAt, List<String> commits, PullRequestHome prHome)
public List<String> getCommits()
public String getId()
public URL getURL()
public Codebase getCodebase()
public PullRequestState getState()
public void setState(PullRequestState state)
public String getTitle()
public void setTitle(String title)
public String getBody()
public void setBody(String body)
public Repository getRepository()
public void setRepository(Repository repository)
public boolean isUpstreamRequired()
public URL findUpstreamPullRequestURL() throws MalformedURLException
MalformedURLException - if found URL is invalidpublic URL findUpstreamIssueURL() throws MalformedURLException
MalformedURLException - if found URL is invalidpublic URL findIssueURL() throws MalformedURLException
MalformedURLException - if found URL is invalidpublic List<URL> findRelatedIssuesURL() throws MalformedURLException
MalformedURLException - if one of found URLs is invalidpublic List<URL> findDependencyPullRequestsURL() throws MalformedURLException
MalformedURLException - if one of found URLs is invalidpublic boolean hasUpgradeMeta()
public boolean hasUpgrade()
public PullRequestUpgrade findPullRequestUpgrade()
public List<PullRequest> findReferencedPullRequests() throws NameNotFoundException
NameNotFoundExceptionpublic boolean addComment(String comment) throws NameNotFoundException
NameNotFoundExceptionpublic List<Label> getLabels() throws NameNotFoundException
NameNotFoundExceptionpublic boolean setLabels(List<Label> labels) throws NameNotFoundException
NameNotFoundExceptionpublic boolean addLabel(Label label) throws NameNotFoundException
NameNotFoundExceptionpublic boolean removeLabel(Label label) throws NameNotFoundException
NameNotFoundExceptionpublic CommitStatus getCommitStatus() throws NameNotFoundException
NameNotFoundExceptionpublic void approveOnPullRequest()
throws NameNotFoundException
NameNotFoundExceptionpublic void requestChangesOnPullRequest(String comment) throws NameNotFoundException
NameNotFoundExceptionpublic boolean isMergeable()
public boolean isMerged()
public MergeableState getMergableState()
public Date getMergedAt()
public boolean isUpgrade()
public boolean hasDependencies()
Copyright © 2020 JBoss by Red Hat. All rights reserved.