public abstract class BasePullEvaluator extends Object implements PullEvaluator
PullEvaluator.Result| Modifier and Type | Field and Description |
|---|---|
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> |
getBugsThatMatchFixVersion(RedhatPullRequest pullRequest) |
List<? extends Issue> |
getIssue(RedhatPullRequest 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<RedhatPullRequest> |
getUpstreamPullRequest(RedhatPullRequest pullRequest)
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(RedhatPullRequest pull)
Evaluates if the given pull request is mergeable according to the rules of the relevant EAP issueFixVersion.
|
protected PullEvaluator.Result |
isMergeableByUpstream(RedhatPullRequest pull) |
boolean |
updateIssueAsMerged(RedhatPullRequest pull)
Marks the issue related to the given pull request merged.
|
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(RedhatPullRequest pull)
PullEvaluatorisMergeable in interface PullEvaluatorpull - a pull request to be evaluatedResult result of the evaluationpublic boolean updateIssueAsMerged(RedhatPullRequest pull)
PullEvaluatorupdateIssueAsMerged in interface PullEvaluatorpull - a pull requestpublic List<? extends Issue> getIssue(RedhatPullRequest 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<RedhatPullRequest> getUpstreamPullRequest(RedhatPullRequest pullRequest)
PullEvaluatorgetUpstreamPullRequest in interface PullEvaluatorpullRequest - a pull requestprotected PullEvaluator.Result isMergeableByUpstream(RedhatPullRequest pull)
protected List<Bug> getBugsThatMatchFixVersion(RedhatPullRequest pullRequest)
Copyright © 2015 JBoss by Red Hat. All rights reserved.