public abstract class BasePullEvaluator extends Object implements PullEvaluator
PullEvaluator.Result| Modifier and Type | Field and Description |
|---|---|
static Pattern |
BUGZILLA_ID_PATTERN |
static String |
EVALUATOR_PROPERTY |
static String |
GITHUB_BRANCH_PROPERTY |
static String |
GITHUB_BRANCH_UPSTREAM |
static String |
GITHUB_ORGANIZAITON_UPSTREAM |
static String |
GITHUB_REPOSITORY_UPSTREAM |
protected String |
githubBranch |
protected PullHelper |
helper |
static String |
ISSUE_FIX_VERSION |
protected String |
issueFixVersion |
protected String |
upstreamBranch |
protected String |
upstreamOrganization |
protected String |
upstreamRepository |
| Constructor and Description |
|---|
BasePullEvaluator() |
| Modifier and Type | Method and Description |
|---|---|
protected List<Bug> |
getBug(org.eclipse.egit.github.core.PullRequest pull) |
List<? extends Issue> |
getIssue(org.eclipse.egit.github.core.PullRequest pull)
Returns the issue(-s) related to the given pull request.
|
protected List<JiraIssue> |
getJiraIssue(org.eclipse.egit.github.core.PullRequest pull) |
String |
getTargetBranch()
Returns the github branch this evaluator is dedicated to.
|
List<org.eclipse.egit.github.core.PullRequest> |
getUpstreamPullRequest(org.eclipse.egit.github.core.PullRequest pull)
Returns the upstream pull request(-s) related to the given pull request.
|
void |
init(PullHelper helper,
Properties configuration,
String version)
Initializes the evaluator.
|
PullEvaluator.Result |
isMergeable(org.eclipse.egit.github.core.PullRequest pull)
Evaluates if the given pull request is mergeable according to
the rules of the relevant EAP issueFixVersion.
|
protected PullEvaluator.Result |
isMergeableByUpstream(org.eclipse.egit.github.core.PullRequest pull) |
static boolean |
isReviewed(PullEvaluator.Result result) |
boolean |
updateIssueAsMerged(org.eclipse.egit.github.core.PullRequest pull)
Marks the issue related to the given pull request merged.
|
public static final Pattern BUGZILLA_ID_PATTERN
public static final String EVALUATOR_PROPERTY
public static final String GITHUB_BRANCH_PROPERTY
public static final String GITHUB_ORGANIZAITON_UPSTREAM
public static final String GITHUB_REPOSITORY_UPSTREAM
public static final String GITHUB_BRANCH_UPSTREAM
public static final String ISSUE_FIX_VERSION
protected PullHelper helper
protected String issueFixVersion
protected String githubBranch
protected String upstreamOrganization
protected String upstreamRepository
protected String upstreamBranch
public void init(PullHelper helper, Properties configuration, String version)
PullEvaluatorinit in interface PullEvaluatorhelper - PullHelper instanceconfiguration - configuration propertiesversion - issueFixVersion name related to this evaluator in the configuration propertiespublic String getTargetBranch()
PullEvaluatorgetTargetBranch in interface PullEvaluatorpublic PullEvaluator.Result isMergeable(org.eclipse.egit.github.core.PullRequest pull)
PullEvaluatorisMergeable in interface PullEvaluatorpull - a pull request to be evaluatedResult result of the evaluationpublic static boolean isReviewed(PullEvaluator.Result result)
public boolean updateIssueAsMerged(org.eclipse.egit.github.core.PullRequest pull)
PullEvaluatorupdateIssueAsMerged in interface PullEvaluatorpull - a pull requestpublic List<? extends Issue> getIssue(org.eclipse.egit.github.core.PullRequest pull)
PullEvaluatorJiraIssue if the pull request is tracked in Jira
or a Bug if it is tracked by Bugzilla or a list of both.getIssue in interface PullEvaluatorpull - a pull requestpublic List<org.eclipse.egit.github.core.PullRequest> getUpstreamPullRequest(org.eclipse.egit.github.core.PullRequest pull)
PullEvaluatorgetUpstreamPullRequest in interface PullEvaluatorpull - a pull requestprotected PullEvaluator.Result isMergeableByUpstream(org.eclipse.egit.github.core.PullRequest pull)
Copyright © 2014 JBoss by Red Hat. All Rights Reserved.