Package org.jboss.set.aphrodite
Class Aphrodite
- java.lang.Object
-
- org.jboss.set.aphrodite.Aphrodite
-
- All Implemented Interfaces:
AutoCloseable
public class Aphrodite extends Object implements AutoCloseable
-
-
Field Summary
Fields Modifier and Type Field Description static StringFILE_PROPERTY
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanaddCommentToIssue(Collection<org.jboss.set.aphrodite.domain.Issue> issues, org.jboss.set.aphrodite.domain.Comment comment)Adds theCommentto all of the providedIssueobjects.booleanaddCommentToIssue(Map<org.jboss.set.aphrodite.domain.Issue,org.jboss.set.aphrodite.domain.Comment> commentMap)Adds theCommentto the associatedIssueobject for all Issue/Comment pairs in theMap.voidaddCommentToIssue(org.jboss.set.aphrodite.domain.Issue issue, org.jboss.set.aphrodite.domain.Comment comment)Adds a new comment to the specified issue.voidaddCommentToPullRequest(org.jboss.set.aphrodite.domain.PullRequest pullRequest, String comment)Deprecated.Useorg.jboss.set.aphrodite.domain.spi.PullRequestHome#addComment()instead.voidaddLabelToPullRequest(org.jboss.set.aphrodite.domain.PullRequest pullRequest, String labelName)Deprecated.Useorg.jboss.set.aphrodite.domain.spi.PullRequestHome#addLabel()instead.voidclose()org.jboss.set.aphrodite.domain.IssuecreateIssue(IssueCreationDetails details)Create skeletal issue.List<org.jboss.set.aphrodite.domain.PullRequest>findPullRequestsRelatedTo(org.jboss.set.aphrodite.domain.PullRequest pullRequest)Deprecated.Useorg.jboss.set.aphrodite.domain.spi.PullRequestHome#findReferencedPullRequests()instead.List<org.jboss.set.aphrodite.domain.PullRequest>findReferencedPullRequests(org.jboss.set.aphrodite.domain.PullRequest pullRequest)Return all the referenced PRs to a given PR using all the repositories defined in the instance.List<org.jboss.set.aphrodite.domain.Stream>getAllStreams()Returns the streams discovered by all of the active StreamServicesList<org.jboss.set.aphrodite.domain.Commit>getCommitsSince(URL url, String branch, long since)Returns a list of commits on a given branch between a given date and noworg.jboss.set.aphrodite.domain.CommitStatusgetCommitStatusFromPullRequest(org.jboss.set.aphrodite.domain.PullRequest pullRequest)Deprecated.Useorg.jboss.set.aphrodite.domain.spi.PullRequestHome#getCommitStatus()instead.org.jboss.set.aphrodite.domain.StreamComponentgetComponentBy(URI repository, org.jboss.set.aphrodite.domain.Codebase codebase)Deprecated.AphroditeConfiggetConfig()List<URI>getDistinctURLRepositoriesByStream(String streamName)Deprecated.List<URI>getDistinctURLRepositoriesFromStreams()Deprecated.org.jboss.set.aphrodite.domain.IssuegetIssue(URL url)Retrieve an issue object associated with the givenURL.org.jboss.set.aphrodite.domain.IssuegetIssue(org.jboss.set.aphrodite.domain.PullRequest pullRequest)Deprecated.List<org.jboss.set.aphrodite.domain.Issue>getIssues(Collection<URL> urls)Retrieve all issues associated with the provided URLs.List<org.jboss.set.aphrodite.domain.Issue>getIssuesAssociatedWith(org.jboss.set.aphrodite.domain.PullRequest pullRequest)Deprecated.List<org.jboss.set.aphrodite.domain.Label>getLabelsFromPullRequest(org.jboss.set.aphrodite.domain.PullRequest pullRequest)Deprecated.Useorg.jboss.set.aphrodite.domain.spi.PullRequestHome#getLabels()instead.List<org.jboss.set.aphrodite.domain.Label>getLabelsFromRepository(org.jboss.set.aphrodite.domain.Repository repository)Retrieve all labels associated with the providedPullRequestinRepositoryobject.org.jboss.set.aphrodite.domain.PullRequestgetPullRequest(URL url)Get thePullRequestlocated at the providedURL.List<org.jboss.set.aphrodite.domain.PullRequest>getPullRequestsByState(org.jboss.set.aphrodite.domain.Repository repository, org.jboss.set.aphrodite.domain.PullRequestState state)Retrieve all PullRequests associated with the providedRepositoryobject, which have a state that matches the providedPullRequestStateobject.org.jboss.set.aphrodite.domain.PullRequestUpgradegetPullRequestUpgrade(org.jboss.set.aphrodite.domain.PullRequest pullRequest)Deprecated.Map<RepositoryType,org.jboss.set.aphrodite.domain.RateLimit>getRateLimits()List<org.jboss.set.aphrodite.domain.Issue>getRelatedIssues(org.jboss.set.aphrodite.domain.PullRequest pullRequest)Deprecated.org.jboss.set.aphrodite.domain.RepositorygetRepository(URL url)Get the repository located at the providedURL.org.jboss.set.aphrodite.domain.StreamgetStream(String streamName)Get a specificStreamobject based upon its String name.List<org.jboss.set.aphrodite.domain.Stream>getStreamsBy(URI repository, org.jboss.set.aphrodite.domain.Codebase codebase)Deprecated.IssueTrackerServicegetTrackerFor(URL url)org.jboss.set.aphrodite.domain.IssuegetUpstreamIssue(org.jboss.set.aphrodite.domain.PullRequest pullRequest)Deprecated.org.jboss.set.aphrodite.domain.PullRequestgetUpstreamPullRequest(org.jboss.set.aphrodite.domain.PullRequest pullRequest)Deprecated.booleanhasUpgrade(org.jboss.set.aphrodite.domain.PullRequest pullRequest)Deprecated.static Aphroditeinstance()Get an instance of the Aphrodite service.static Aphroditeinstance(AphroditeConfig config)Get an instance of the Aphrodite service.booleanisCPReleased(String cpVersion)Check if a given CP version is released.booleanisRepositoryLabelsModifiable(org.jboss.set.aphrodite.domain.Repository repository)Discover if the user logged into aRepositoryServicehas the correct permissions to apply/remove labels to pull request in the providedRepositorybooleanisUpstreamRequired(org.jboss.set.aphrodite.domain.PullRequest pullRequest)Deprecated.voidremoveLabelFromPullRequest(org.jboss.set.aphrodite.domain.PullRequest pullRequest, String name)Deprecated.Useorg.jboss.set.aphrodite.domain.spi.PullRequestHome#removeLabel()instead.List<org.jboss.set.aphrodite.domain.Issue>searchIssues(org.jboss.set.aphrodite.domain.SearchCriteria searchCriteria)Return all issues, across all Issue Trackers, which match the passedSearchCriteria.List<org.jboss.set.aphrodite.domain.Issue>searchIssuesByFilter(URL filterUrl)Return all issues which match the provided filter.voidsetLabelsToPullRequest(org.jboss.set.aphrodite.domain.PullRequest pullRequest, List<org.jboss.set.aphrodite.domain.Label> labels)Deprecated.Useorg.jboss.set.aphrodite.domain.spi.PullRequestHome#setLabels()instead.booleanupdateIssue(org.jboss.set.aphrodite.domain.Issue issue)Update a specificIssueat the remote issue tracker service.
-
-
-
Field Detail
-
FILE_PROPERTY
public static final String FILE_PROPERTY
- See Also:
- Constant Field Values
-
-
Method Detail
-
instance
public static Aphrodite instance() throws AphroditeException
Get an instance of the Aphrodite service. If the service has not yet been initialised, then a new service is created. This service will use the JSON configuration file specified in the "aphrodite.config" environment variable.- Returns:
- instance the singleton instance of the Aphrodite service.
- Throws:
AphroditeException- if the specified configuration file cannot be opened.
-
instance
public static Aphrodite instance(AphroditeConfig config) throws AphroditeException
Get an instance of the Aphrodite service. If the service has not yet been initialised, then a new service is created using config. If the service has already been initialised then anIllegalStateExceptionis thrown if a differentAphroditeConfigobject is passed.- Parameters:
config- anAphroditeConfigobject containing all configuration data.- Returns:
- instance the singleton instance of the Aphrodite service.
- Throws:
AphroditeException- if initialization failsIllegalStateException- if anAphroditeservice has already been initialised.
-
close
public void close() throws Exception- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
getIssue
public org.jboss.set.aphrodite.domain.Issue getIssue(URL url) throws NotFoundException
Retrieve an issue object associated with the givenURL.- Parameters:
url- theURLof the issue to be retrieved.- Returns:
- the
Issueassociated with the providedURK. - Throws:
NotFoundException- if the providedURLis not associated with an issue at any of the active issuetrackers.
-
createIssue
public org.jboss.set.aphrodite.domain.Issue createIssue(IssueCreationDetails details) throws NotFoundException, MalformedURLException, AphroditeException
Create skeletal issue.- Parameters:
trackerURL- - URL of tracker in which issue should be createdprojectKey- - ID of project/productparameters- - parameters, differ for each tracker.- Returns:
- Throws:
NotFoundExceptionMalformedURLExceptionAphroditeException
-
getIssue
@Deprecated public org.jboss.set.aphrodite.domain.Issue getIssue(org.jboss.set.aphrodite.domain.PullRequest pullRequest) throws NotFoundException, MalformedURLException
Deprecated.Retrieve issue associated with PR. This method require PR to conform to metadata scheme and have issue linked to this PR with 'Issue: <TICKET>'- Parameters:
pullRequest- - PR which will be interrogated.- Returns:
- null - if no issue is linked in PR
- Issue - if there is linked issue that can be fetched
- Throws:
NotFoundException- - if there is linked issue but either no tracker or issue does not exist in trackerMalformedURLException
-
getRelatedIssues
@Deprecated public List<org.jboss.set.aphrodite.domain.Issue> getRelatedIssues(org.jboss.set.aphrodite.domain.PullRequest pullRequest) throws MalformedURLException, NotFoundException
Deprecated.Retrieve list of related issues associated with PR. This method require PR to conform to metadata scheme and have issue linked to this PR with 'Related Issues: <TICKET>,<TICKET>,<TICKET>'- Parameters:
pullRequest- - PR which will be interrogated.- Returns:
- null - if no issues are linked in PR
- Issue - if there are linked issues that can be fetched
- Throws:
NotFoundException- - if there is linked issue but either no tracker or issue does not exist in trackerMalformedURLException
-
getUpstreamIssue
@Deprecated public org.jboss.set.aphrodite.domain.Issue getUpstreamIssue(org.jboss.set.aphrodite.domain.PullRequest pullRequest) throws NotFoundException, MalformedURLException
Deprecated.Retrieve upstream issue associated with this PR. This method require PR to conform to metadata scheme and have issue linked to this PR with 'Upstream Issue: <TICKET>'.- Parameters:
pullRequest- - PR which will be interrogated.- Returns:
- null - if no issue is linked in PR or
- Issue - if there is linked issue that can be fetched
isUpstreamRequired(PullRequest)return false;- Throws:
NotFoundException- - if there is linked issue but either no tracker or issue does not exist in trackerMalformedURLException
-
getUpstreamPullRequest
@Deprecated public org.jboss.set.aphrodite.domain.PullRequest getUpstreamPullRequest(org.jboss.set.aphrodite.domain.PullRequest pullRequest) throws MalformedURLException, NotFoundException
Deprecated.Retrieve upstream PR associated with this PR. This method require PR to conform to metadata scheme and have issue linked to this PR with 'Upstream PR: <TICKET>'.- Parameters:
pullRequest- - PR which will be interrogated.- Returns:
- null - if no upstream PR is linked in PR or
- Issue - if there is linked PR that can be fetched
isUpstreamRequired(PullRequest)return false;- Throws:
NotFoundException- - if there is linked PR but either no tracker or issue does not exist in trackerMalformedURLException
-
getPullRequestUpgrade
@Deprecated public org.jboss.set.aphrodite.domain.PullRequestUpgrade getPullRequestUpgrade(org.jboss.set.aphrodite.domain.PullRequest pullRequest)
Deprecated.
-
isUpstreamRequired
@Deprecated public boolean isUpstreamRequired(org.jboss.set.aphrodite.domain.PullRequest pullRequest)
Deprecated.Check if PR require upstream or not.- Parameters:
pullRequest-- Returns:
-
hasUpgrade
@Deprecated public boolean hasUpgrade(org.jboss.set.aphrodite.domain.PullRequest pullRequest)
Deprecated.Check if said PR has upgrade meta present.- Parameters:
pullRequest-- Returns:
-
getIssues
public List<org.jboss.set.aphrodite.domain.Issue> getIssues(Collection<URL> urls)
Retrieve all issues associated with the provided URLs. This method simply logs any issue URLs that cannot be retrieved from aIssueTrackerServer. If the provided URLs collection is empty, or no issues are found, then an empty List is returned.- Parameters:
urls- a collection of issue URLs.- Returns:
- a list of
Issueobjects associated with the provided urls.
-
searchIssues
public List<org.jboss.set.aphrodite.domain.Issue> searchIssues(org.jboss.set.aphrodite.domain.SearchCriteria searchCriteria)
Return all issues, across all Issue Trackers, which match the passedSearchCriteria.- Parameters:
searchCriteria- all set fields will be search for.- Returns:
- a list of all
Issueobjects which match the specified searchCriteria, or an empty list if no issues match the searched criteria.
-
searchIssuesByFilter
public List<org.jboss.set.aphrodite.domain.Issue> searchIssuesByFilter(URL filterUrl) throws NotFoundException
Return all issues which match the provided filter.- Parameters:
filterUrl- the url of the issue tracker filtered to be applied.- Returns:
- a list of all
Issueobjects which are returned by the provided filter. - Throws:
NotFoundException- if the filterURL is not associated with any filters at any of the Issue Trackers.
-
updateIssue
public boolean updateIssue(org.jboss.set.aphrodite.domain.Issue issue) throws NotFoundException, AphroditeExceptionUpdate a specificIssueat the remote issue tracker service. Note, this does not update issue comments or an issues description. To add a new comment, useaddCommentToIssue(Issue, Comment)- Parameters:
issue- the issue to be updated at the associatedIssueTrackerService- Returns:
- true if the issue was successfully updated, false otherwise.
- Throws:
NotFoundException- if the providedIssuecannot be found at the IssueTracker.AphroditeException- if the user credentials supplied for this issue track do not have permission to update this issue, or a field within this issue.
-
addCommentToIssue
public void addCommentToIssue(org.jboss.set.aphrodite.domain.Issue issue, org.jboss.set.aphrodite.domain.Comment comment) throws NotFoundExceptionAdds a new comment to the specified issue.- Parameters:
issue- the issue to add a new comment to.comment- the comment to be added to the issue.- Throws:
NotFoundException
-
addCommentToIssue
public boolean addCommentToIssue(Map<org.jboss.set.aphrodite.domain.Issue,org.jboss.set.aphrodite.domain.Comment> commentMap)
Adds theCommentto the associatedIssueobject for all Issue/Comment pairs in theMap. Null comments are ignored.- Parameters:
commentMap- the map containing all Issues that are to be updated and the associated comments.- Returns:
- true if all comments are successfully added to their associated Issue, otherwise false.
-
addCommentToIssue
public boolean addCommentToIssue(Collection<org.jboss.set.aphrodite.domain.Issue> issues, org.jboss.set.aphrodite.domain.Comment comment)
Adds theCommentto all of the providedIssueobjects.- Parameters:
issues- a collection of all issues that the comment should be added to.comment- the comment to be added to all issues.- Returns:
- true if the comment is successfully added to all issues.
-
getIssuesAssociatedWith
@Deprecated public List<org.jboss.set.aphrodite.domain.Issue> getIssuesAssociatedWith(org.jboss.set.aphrodite.domain.PullRequest pullRequest)
Deprecated.Retrieve all Issues associated with the provided pull request object. Implementations of this method assume that the urls of the related issues are present in the pullRequest's description field.- Parameters:
pullRequest- thePullRequestobject whoms associated Issues should be returned.- Returns:
- a list of all
Issueobjects, or an empty list if no issues can be found.
-
getRepository
public org.jboss.set.aphrodite.domain.Repository getRepository(URL url) throws NotFoundException
Get the repository located at the providedURL.- Parameters:
url- theURLof the repository to be retrieved.- Returns:
- the
Repositoryobject. - Throws:
NotFoundException- if aRepositorycannot be found at the provided base url, or no service exists with the same host domain as the provided URL.
-
getPullRequestsByState
public List<org.jboss.set.aphrodite.domain.PullRequest> getPullRequestsByState(org.jboss.set.aphrodite.domain.Repository repository, org.jboss.set.aphrodite.domain.PullRequestState state) throws NotFoundException
Retrieve all PullRequests associated with the providedRepositoryobject, which have a state that matches the providedPullRequestStateobject.- Parameters:
repository- theRepositoryobject whose associated PullRequests should be returned.state- thePullRequestStatewhich the returnedPullRequestobjects must have.- Returns:
- a list of all matching
PullRequestobjects, or an empty list if no pullRequests can be found. - Throws:
NotFoundException- if an exception is encountered when trying to retrieve pullRequests from a RepositoryService
-
getPullRequest
public org.jboss.set.aphrodite.domain.PullRequest getPullRequest(URL url) throws NotFoundException
Get thePullRequestlocated at the providedURL.- Parameters:
url- theURLof the pullRequest to be retrieved.- Returns:
- the
PullRequestobject. - Throws:
NotFoundException- if aPullRequestcannot be found at the provided base url.
-
getRateLimits
public Map<RepositoryType,org.jboss.set.aphrodite.domain.RateLimit> getRateLimits() throws NotFoundException
- Throws:
NotFoundException
-
getLabelsFromRepository
public List<org.jboss.set.aphrodite.domain.Label> getLabelsFromRepository(org.jboss.set.aphrodite.domain.Repository repository) throws NotFoundException
Retrieve all labels associated with the providedPullRequestinRepositoryobject.- Parameters:
repository- theRepositoryobject whose associated labels should be returned.- Returns:
- a list of all matching
Labelobjects, or an empty list if no labels can be found. - Throws:
NotFoundException- if an error is encountered when trying to retrieve labels from a RepositoryService
-
getLabelsFromPullRequest
@Deprecated public List<org.jboss.set.aphrodite.domain.Label> getLabelsFromPullRequest(org.jboss.set.aphrodite.domain.PullRequest pullRequest) throws NotFoundException
Deprecated.Useorg.jboss.set.aphrodite.domain.spi.PullRequestHome#getLabels()instead.Retrieve all labels associated with the providedPullRequestobject.- Parameters:
pullRequest- request thePullRequestobject whose associated labels should be returned.- Returns:
- a list of all matching
Labelobjects, or an empty list if no pull request can be found. - Throws:
NotFoundException- if an error is encountered when trying to retrieve labels from a RepositoryService
-
isRepositoryLabelsModifiable
public boolean isRepositoryLabelsModifiable(org.jboss.set.aphrodite.domain.Repository repository) throws NotFoundExceptionDiscover if the user logged into aRepositoryServicehas the correct permissions to apply/remove labels to pull request in the providedRepository- Parameters:
repository- theRepositorywhose permissions are to be checked- Returns:
- true if the user has permission, otherwise false.
- Throws:
NotFoundException- if the specifiedRepositorycannot be found.
-
setLabelsToPullRequest
@Deprecated public void setLabelsToPullRequest(org.jboss.set.aphrodite.domain.PullRequest pullRequest, List<org.jboss.set.aphrodite.domain.Label> labels) throws NotFoundException, AphroditeException
Deprecated.Useorg.jboss.set.aphrodite.domain.spi.PullRequestHome#setLabels()instead.Set the labels for the providedPullRequestobject.- Parameters:
pullRequest- thePullRequestobject whose will be set.labels- theLabelapply to thePullRequest- Throws:
NotFoundException- if theLabelcan not be found in the providedPullRequestAphroditeException- if add theLabelis not consistent with get labels
-
removeLabelFromPullRequest
@Deprecated public void removeLabelFromPullRequest(org.jboss.set.aphrodite.domain.PullRequest pullRequest, String name) throws NotFoundException
Deprecated.Useorg.jboss.set.aphrodite.domain.spi.PullRequestHome#removeLabel()instead.Delete a label from the providedPullRequestobject.- Parameters:
pullRequest- thePullRequestwhose label will be removed.name- theLabelname will be removed.- Throws:
NotFoundException- if theLabelname can not be found in the providedPullRequest, or an exception occurs when contacting the RepositoryService
-
addCommentToPullRequest
@Deprecated public void addCommentToPullRequest(org.jboss.set.aphrodite.domain.PullRequest pullRequest, String comment) throws NotFoundException
Deprecated.Useorg.jboss.set.aphrodite.domain.spi.PullRequestHome#addComment()instead.Add aCommentto the specifiedPullRequestobject, and propagate the changes to the remote repository.- Parameters:
pullRequest- thePullRequeston which the comment will be made.comment- the newComment.- Throws:
NotFoundException- if thePullRequestcannot be found at the remote repository.
-
addLabelToPullRequest
@Deprecated public void addLabelToPullRequest(org.jboss.set.aphrodite.domain.PullRequest pullRequest, String labelName) throws NotFoundException
Deprecated.Useorg.jboss.set.aphrodite.domain.spi.PullRequestHome#addLabel()instead.Attach a label to the specified pull request. Note the label must already exist at remote repository, otherwise it will not be applied. If the specified label is already associated with the provided pull request then no further action is taken.- Parameters:
pullRequest- thePullRequestto which the label will be applied.labelName- the name of the label to be applied.- Throws:
NotFoundException- if thePullRequestcannot be found, or the labelName does not exist.
-
findPullRequestsRelatedTo
@Deprecated public List<org.jboss.set.aphrodite.domain.PullRequest> findPullRequestsRelatedTo(org.jboss.set.aphrodite.domain.PullRequest pullRequest)
Deprecated.Useorg.jboss.set.aphrodite.domain.spi.PullRequestHome#findReferencedPullRequests()instead.Retrieve allPullRequestobjects related to the supplied pull request. A pull request is related if its URL is referenced in the provided pull request object. Note, this method fails silently if a pull request cannot be retrieved from a URL, with the error message simply logged.- Parameters:
pullRequest- request thePullRequestobject to be queried against- Returns:
- a list of PullRequest objects that are related to the supplied pull request object
-
getCommitStatusFromPullRequest
@Deprecated public org.jboss.set.aphrodite.domain.CommitStatus getCommitStatusFromPullRequest(org.jboss.set.aphrodite.domain.PullRequest pullRequest) throws NotFoundException
Deprecated.Useorg.jboss.set.aphrodite.domain.spi.PullRequestHome#getCommitStatus()instead.Retrieve the current CI status of the latest commit associated with a given pull request.- Parameters:
pullRequest- thePullRequestobject whose status is to be queried- Returns:
- the CI status of the latest commit associated with the given pull request
- Throws:
NotFoundException- if no commit status can be found for the provided pull request
-
getAllStreams
public List<org.jboss.set.aphrodite.domain.Stream> getAllStreams()
Returns the streams discovered by all of the active StreamServices- Returns:
- a list of all streams discovered by all
StreamServiceinstances.
-
getStream
public org.jboss.set.aphrodite.domain.Stream getStream(String streamName) throws NotFoundException
Get a specificStreamobject based upon its String name.- Parameters:
streamName- the name of theStreamto be returned.- Returns:
- Stream the first
Streamobject which corresponds to the specified streamName if it exists at a StreamService. - Throws:
NotFoundException- if the specified streamName does not exist at any of the loaded StreamServices.
-
isCPReleased
public boolean isCPReleased(String cpVersion)
Check if a given CP version is released.- Parameters:
cpVersion- the CP version to be tested. Jira accepts GA version format x.y.z.GA, e.g. 7.1.2.GA. Bugzilla accepts version format x.y.z, e.g. 6.4.18.- Returns:
- true if the given version is released, otherwise false.
-
getDistinctURLRepositoriesFromStreams
@Deprecated public List<URI> getDistinctURLRepositoriesFromStreams()
Deprecated.Retrieve all unique Repositories that exists across all Streams.- Returns:
- a list of unique Repositories.
-
getDistinctURLRepositoriesByStream
@Deprecated public List<URI> getDistinctURLRepositoriesByStream(String streamName)
Deprecated.Retrieve all Repositories associated with a given Stream, or an empty lists if no Repositories are associated with the given streamName.- Parameters:
streamName- the name of theStreamcontaining the returned repositories.- Returns:
- a list of unique Repositories, or an empty lists if no Repositories are associated with the given streamName.
-
getStreamsBy
@Deprecated public List<org.jboss.set.aphrodite.domain.Stream> getStreamsBy(URI repository, org.jboss.set.aphrodite.domain.Codebase codebase)
Deprecated.Find all streams associated with a given repository and codebase.- Parameters:
repository- the Repository to be searched againstcodebase- the codebase to be searched against- Returns:
- a list of Streams associated with the given repository and codebase.
-
getComponentBy
@Deprecated public org.jboss.set.aphrodite.domain.StreamComponent getComponentBy(URI repository, org.jboss.set.aphrodite.domain.Codebase codebase) throws NotFoundException
Deprecated.Get the StreamComponent which specifies the given repository and codebase. Note, this returns the first matching component found in any of the loaded StreamServices.- Parameters:
repository- the Repository to be searched against.codebase- the codebase to be searched against.- Returns:
- the name of the component of this repository. If it does not exist it will return the URL of the repository.
- Throws:
NotFoundException- if a StreamComponent with the specified repository and codebase does not exist at this stream service.
-
getTrackerFor
public IssueTrackerService getTrackerFor(URL url)
-
getConfig
public AphroditeConfig getConfig()
-
findReferencedPullRequests
public List<org.jboss.set.aphrodite.domain.PullRequest> findReferencedPullRequests(org.jboss.set.aphrodite.domain.PullRequest pullRequest)
Return all the referenced PRs to a given PR using all the repositories defined in the instance. All of them are called in order to get the references for all of them.- Parameters:
pullRequest- The PR to obtain the references PRs- Returns:
- The list of PRs referenced by this PR
-
getCommitsSince
public List<org.jboss.set.aphrodite.domain.Commit> getCommitsSince(URL url, String branch, long since) throws NotFoundException
Returns a list of commits on a given branch between a given date and now- Parameters:
url- URL of theRepositorybranch- branch in theRepositorysince- date in milliseconds- Returns:
- List of commits past the given date
- Throws:
NotFoundException- if the specifiedRepositorycannot be found.
-
-