public interface RepositoryService
| Modifier and Type | Method and Description |
|---|---|
void |
addCommentToPullRequest(PullRequest pullRequest,
String comment)
Deprecated.
Use
org.jboss.set.aphrodite.domain.spi.PullRequestHome#addComment() instead. |
void |
addLabelToPullRequest(PullRequest pullRequest,
String labelName)
Deprecated.
Use
org.jboss.set.aphrodite.domain.spi.PullRequestHome#addLabel() instead. |
default void |
destroy()
allows to destroy and deallocate resources
|
List<PullRequest> |
findPullRequestsRelatedTo(PullRequest pullRequest)
Deprecated.
Use
org.jboss.set.aphrodite.domain.spi.PullRequestHome#findReferencedPullRequests() instead. |
CommitStatus |
getCommitStatusFromPullRequest(PullRequest pullRequest)
Deprecated.
Use
org.jboss.set.aphrodite.domain.spi.PullRequestHome#getCommitStatus() instead. |
List<Label> |
getLabelsFromPullRequest(PullRequest pullRequest)
Deprecated.
Use
org.jboss.set.aphrodite.domain.spi.PullRequestHome#getLabels() instead. |
List<Label> |
getLabelsFromRepository(Repository repository)
Retrieve all labels associated with the provided
PullRequest in Repository object. |
PullRequest |
getPullRequest(URL url)
Get the
PullRequest located at the provided URL. |
PullRequestHome |
getPullRequestHome()
Return the PullRequestHome service for this repository.
|
List<PullRequest> |
getPullRequestsAssociatedWith(Issue issue)
Deprecated.
|
List<PullRequest> |
getPullRequestsByState(Repository repository,
PullRequestState state)
Retrieve all pull requests associated with the provided
Repository object, which have a
state that matches the provided PullRequestState object. |
RateLimit |
getRateLimit() |
Repository |
getRepository(URL url)
Get the repository located at the provided
URL. |
RepositoryType |
getRepositoryType()
Get Repository type
|
boolean |
hasModifiableLabels(Repository repository)
Discover if the user logged into this
RepositoryService has the correct permissions to apply/remove
labels to pull request in the provided Repository |
boolean |
init(AphroditeConfig config)
Initiate this
RepositoryService using the supplied AphroditeConfig. |
boolean |
init(RepositoryConfig config)
Initiate this
RepositoryService using the supplied RepositoryConfig. |
void |
removeLabelFromPullRequest(PullRequest pullRequest,
String name)
Deprecated.
Use
org.jboss.set.aphrodite.domain.spi.PullRequestHome#removeLabel() instead. |
boolean |
repositoryAccessable(URL url)
Checks whether the provided
URL is accessable. |
void |
setLabelsToPullRequest(PullRequest pullRequest,
List<Label> labels)
Deprecated.
Use
org.jboss.set.aphrodite.domain.spi.PullRequestHome#setLabels() instead. |
boolean |
urlExists(URL url)
Checks whether the provided
URL is on the same host as this service. |
boolean init(AphroditeConfig config)
RepositoryService using the supplied AphroditeConfig.
The first RepositoryConfig object found in AphroditeConfig object,
is used to initiate the service and is subsequently removed from the config to prevent the same
service being initiated twice.config - a AphroditeConfig object containing at least one
RepositoryConfig object.true if the service was initialised without errors, false otherwise.IllegalArgumentException - if no RepositoryConfig objects are present.boolean init(RepositoryConfig config)
RepositoryService using the supplied RepositoryConfig.config - a RepositoryConfig object containing all configuration information.true if the service was initialised without errors, false otherwise.boolean urlExists(URL url)
URL is on the same host as this service.url - the URL to check.URL has the same host as this service, otherwise false.NullPointerException - if the provided URL is null.boolean repositoryAccessable(URL url)
URL is accessable.url - the URL to check.URL is accessable, otherwise false.Repository getRepository(URL url) throws NotFoundException
URL.url - the URL of the repository to be retrieved.Repository object.NotFoundException - if a Repository cannot be found at the provided base url.PullRequest getPullRequest(URL url) throws NotFoundException
PullRequest located at the provided URL.url - the URL of the pull request to be retrieved.PullRequest object.NotFoundException - if a PullRequest cannot be found at the provided base url.@Deprecated List<PullRequest> getPullRequestsAssociatedWith(Issue issue) throws NotFoundException
Issue objectissue - the Issue object whose associated pull requests should be returned.PullRequest objects, or an empty list if no pull request can be found.NotFoundException - if an exception is thrown when searching the RepositoryService.List<PullRequest> getPullRequestsByState(Repository repository, PullRequestState state) throws NotFoundException
Repository object, which have a
state that matches the provided PullRequestState object.repository - the Repository object whose associated pull requests should be returned.state - the PullRequestsState which the returned PullRequest objects must have.PullRequest objects, or an empty list if no pull request can be found.NotFoundException - if the provided Repository cannot be found at the RepositoryService.List<Label> getLabelsFromRepository(Repository repository) throws NotFoundException
PullRequest in Repository object.repository - the Repository object whose associated labels should be returned.Label objects, or an empty list if no label can be found.NotFoundException - if the provided Repository url not consistent with the baseURL.@Deprecated List<Label> getLabelsFromPullRequest(PullRequest pullRequest) throws NotFoundException
org.jboss.set.aphrodite.domain.spi.PullRequestHome#getLabels() instead.PullRequest object.pullRequest - the PullRequest object whose associated labels should be returned.Label objects, or an empty list if no pull request can be found.NotFoundException - if the provided PullRequest url not consistent with the baseURL.boolean hasModifiableLabels(Repository repository) throws NotFoundException
RepositoryService has the correct permissions to apply/remove
labels to pull request in the provided Repositoryrepository - the Repository whose permissions are to be checkedNotFoundException - if the specified Repository cannot be found.@Deprecated void setLabelsToPullRequest(PullRequest pullRequest, List<Label> labels) throws NotFoundException, AphroditeException
org.jboss.set.aphrodite.domain.spi.PullRequestHome#setLabels() instead.PullRequest object.pullRequest - the PullRequest object whose will be set.labels - the Label apply to the PullRequestNotFoundException - if the Label can not be found in the provided PullRequestAphroditeException - if add the Label is not consistent with get labels@Deprecated void removeLabelFromPullRequest(PullRequest pullRequest, String name) throws NotFoundException
org.jboss.set.aphrodite.domain.spi.PullRequestHome#removeLabel() instead.PullRequest object.pullRequest - the PullRequest whose label will be removed.name - the Label name will be removed.NotFoundException - if the Label name can not be found in the provided PullRequest@Deprecated void addCommentToPullRequest(PullRequest pullRequest, String comment) throws NotFoundException
org.jboss.set.aphrodite.domain.spi.PullRequestHome#addComment() instead.Comment to the specified PullRequest object, and propagate the changes
to the remote repository.pullRequest - the PullRequest on which the comment will be made.comment - the new Comment.NotFoundException - if the PullRequest cannot be found at the remote repository.@Deprecated void addLabelToPullRequest(PullRequest pullRequest, String labelName) throws NotFoundException
org.jboss.set.aphrodite.domain.spi.PullRequestHome#addLabel() instead.NotFoundException will be thrown. If the specified label is already
associated with the provided pull request then no further action is taken.pullRequest - the PullRequest to which the label will be applied.labelName - the name of the label to be applied.NotFoundException - if the specified labelName has not been defined at the remote repository.@Deprecated List<PullRequest> findPullRequestsRelatedTo(PullRequest pullRequest)
org.jboss.set.aphrodite.domain.spi.PullRequestHome#findReferencedPullRequests() instead.pullRequest - the PullRequest on which pull requests related are being searched@Deprecated CommitStatus getCommitStatusFromPullRequest(PullRequest pullRequest) throws NotFoundException
org.jboss.set.aphrodite.domain.spi.PullRequestHome#getCommitStatus() instead.pullRequest - the PullRequest object whose status is to be queriedNotFoundException - if no commit status can be found for the provided pull requestdefault void destroy()
RateLimit getRateLimit() throws NotFoundException
NotFoundExceptionRepositoryType getRepositoryType()
PullRequestHome getPullRequestHome()
Copyright © 2020 JBoss by Red Hat. All rights reserved.