public class GitHubRepositoryService extends AbstractRepositoryService
baseUrl, config, REPOSITORY_TYPE| Constructor and Description |
|---|
GitHubRepositoryService() |
| Modifier and Type | Method and Description |
|---|---|
void |
addCommentToPatch(Patch patch,
String comment)
Add a
Comment to the specified Patch object, and propagate the changes
to the remote repository. |
void |
addLabelToPatch(Patch patch,
String labelName)
Attach a label to the specified patch.
|
protected org.apache.commons.logging.Log |
getLog() |
Patch |
getPatch(URL url)
Get the
Patch located at the provided URL. |
List<Patch> |
getPatchesAssociatedWith(Issue issue)
Retrieve all Patches associated with the provided
Issue object |
List<Patch> |
getPatchesByStatus(Repository repository,
PatchStatus status)
Retrieve all Patches associated with the provided
Repository object, which have a
status that matches the provided PatchStatus object. |
Repository |
getRepository(URL url)
Get the repository located at the provided
URL. |
boolean |
init(RepositoryConfig config)
Initiate this
RepositoryService using the supplied RepositoryConfig. |
checkHost, initprotected org.apache.commons.logging.Log getLog()
getLog in class AbstractRepositoryServicepublic boolean init(RepositoryConfig config)
RepositoryServiceRepositoryService using the supplied RepositoryConfig.init in interface RepositoryServiceinit in class AbstractRepositoryServiceconfig - a RepositoryConfig object containing all configuration information.true if the service was initialised without errors, false otherwise.public Patch getPatch(URL url) throws NotFoundException
RepositoryServicePatch located at the provided URL.getPatch in interface RepositoryServicegetPatch in class AbstractRepositoryServiceurl - the URL of the patch to be retrieved.Patch object.NotFoundException - if a Patch cannot be found at the provided base url.public Repository getRepository(URL url) throws NotFoundException
RepositoryServiceURL.getRepository in interface RepositoryServicegetRepository in class AbstractRepositoryServiceurl - the URL of the repository to be retrieved.Repository object.NotFoundException - if a Repository cannot be found at the provided base url.public List<Patch> getPatchesAssociatedWith(Issue issue) throws NotFoundException
RepositoryServiceIssue objectgetPatchesAssociatedWith in interface RepositoryServicegetPatchesAssociatedWith in class AbstractRepositoryServiceissue - the Issue object whose associated Patches should be returned.Patch objects, or an empty list if no patches can be found.NotFoundException - if the provided Repository cannot be found at the RepositoryService.public List<Patch> getPatchesByStatus(Repository repository, PatchStatus status) throws NotFoundException
RepositoryServiceRepository object, which have a
status that matches the provided PatchStatus object.getPatchesByStatus in interface RepositoryServicegetPatchesByStatus in class AbstractRepositoryServicerepository - the Repository object whose associated Patches should be returned.status - the PatchStatus which the returned Patch objects must have.Patch objects, or an empty list if no patches can be found.NotFoundException - if the provided Repository cannot be found at the RepositoryService.public void addCommentToPatch(Patch patch, String comment) throws NotFoundException
RepositoryServiceComment to the specified Patch object, and propagate the changes
to the remote repository.addCommentToPatch in interface RepositoryServiceaddCommentToPatch in class AbstractRepositoryServicepatch - the Patch on which the comment will be made.comment - the new Comment.NotFoundException - if the Patch cannot be found at the remote repository.public void addLabelToPatch(Patch patch, String labelName) throws NotFoundException
RepositoryServiceNotFoundException will be thrown. If the specified label is already
associated with the provided patch then no further action is taken.patch - the Patch 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.Copyright © 2016 JBoss by Red Hat. All rights reserved.