Class RepositoryResource
java.lang.Object
com.atlassian.bamboo.plugins.testutils.rest.resource.repository.RepositoryResource
@Path("repository")
@Consumes("application/json")
@Produces("application/json")
@Singleton
public class RepositoryResource
extends Object
-
Constructor Summary
ConstructorsConstructorDescriptionRepositoryResource(BambooUserManager bambooUserManager, RepositoryTestService repositoryTestService, RepositoryDefinitionManager repositoryDefinitionManager, VcsPullRequestService pullRequestService, VcsRepositoryManager vcsRepositoryManager, PlanManager planManager, ResultsSummaryManager resultsSummaryManager, BuildResultWarningSummaryManager buildResultWarningSummaryManager, BranchDetectionService branchDetectionService, BambooSpecsManager bambooSpecsManager, ProjectManager projectManager, CachedRepositoryDefinitionManager cachedRepositoryDefinitionManager, RestAuthenticationContext restAuthenticationContext) -
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.ResponsecreateLinkedRepository(@NotNull RestRepositoryConfig repositoryConfig) jakarta.ws.rs.core.Responsejakarta.ws.rs.core.ResponsedeleteBuildWarnings(long repositoryId, String resultKeyString) jakarta.ws.rs.core.ResponsedeleteLinkedRepository(long repositoryId) jakarta.ws.rs.core.ResponsedeleteLinkedRepository(String repositoryName) jakarta.ws.rs.core.Responsejakarta.ws.rs.core.ResponsegetProjectRepositories(String projectKey) booleanisPullRequestClosed(String repositoryName, @Nullable String pullRequestKey) booleanisRssEnabled(String repositoryName) jakarta.ws.rs.core.ResponsesendBuildWarnings(long repositoryId, String resultKeyString, RestBuildWarnings request) booleansendCommitComment(String repositoryName, Map<String, String> body) Used for testing of commit comment functionality.jakarta.ws.rs.core.ResponsetriggerBranchDetection(long repositoryId, boolean ignoreChainsConfig)
-
Constructor Details
-
RepositoryResource
@Inject public RepositoryResource(BambooUserManager bambooUserManager, RepositoryTestService repositoryTestService, RepositoryDefinitionManager repositoryDefinitionManager, VcsPullRequestService pullRequestService, VcsRepositoryManager vcsRepositoryManager, PlanManager planManager, ResultsSummaryManager resultsSummaryManager, BuildResultWarningSummaryManager buildResultWarningSummaryManager, BranchDetectionService branchDetectionService, BambooSpecsManager bambooSpecsManager, ProjectManager projectManager, CachedRepositoryDefinitionManager cachedRepositoryDefinitionManager, RestAuthenticationContext restAuthenticationContext)
-
-
Method Details
-
createLinkedRepository
@Path("linked") @POST public RestRepositoryDefinition createLinkedRepository(@NotNull @NotNull RestRepositoryConfig repositoryConfig) throws WebValidationException - Throws:
WebValidationException
-
deleteLinkedRepository
@Path("linked/{repositoryId}") @DELETE public jakarta.ws.rs.core.Response deleteLinkedRepository(@PathParam("repositoryId") long repositoryId) -
deleteLinkedRepository
@Path("linked/name/{repositoryName}") @DELETE public jakarta.ws.rs.core.Response deleteLinkedRepository(@PathParam("repositoryName") String repositoryName) -
enableRss
@Path("linked/rssEnable/{repositoryName}") @POST public jakarta.ws.rs.core.Response enableRss(@PathParam("repositoryName") String repositoryName) -
enableRss
-
isRssEnabled
@Path("linked/rssEnable/{repositoryName}") @GET public boolean isRssEnabled(@PathParam("repositoryName") String repositoryName) -
deleteAllLinkedRepositories
@Path("linked") @DELETE public jakarta.ws.rs.core.Response deleteAllLinkedRepositories() -
isPullRequestClosed
@GET @Path("{repositoryName}/pull-request/{pullRequestKey}/closed") public boolean isPullRequestClosed(@PathParam("repositoryName") String repositoryName, @Nullable @PathParam("pullRequestKey") @Nullable String pullRequestKey) throws WebValidationException - Throws:
WebValidationException
-
sendCommitComment
@POST @Path("{repositoryName}/commitComment") public boolean sendCommitComment(@PathParam("repositoryName") String repositoryName, Map<String, String> body) throws WebValidationException, RepositoryExceptionUsed for testing of commit comment functionality. Generates RssSuccessEvent or RssErrorEvent depending on given body content. It leaves comment which will be propagated to GH or BbC depending on type of repository. It's not yet used anywhere and was created to simplify manual testing of commit comment functionality.curl -H 'Content-Type: application/json' -X POST -u admin:admin http://localhost:9087/bamboo/rest/backdoor/1.0/repository/github/commitComment -d '{"commitId":"dc88147961e5f0c2302511d5313ce2f9429843cd","planKey":"TEST-CTEST","isSuccess":true,"deploymentId":2162689}' -
sendBuildWarnings
@PUT @Path("{repositoryId}/buildWarnings/{planResultKey}") public jakarta.ws.rs.core.Response sendBuildWarnings(@PathParam("repositoryId") long repositoryId, @PathParam("planResultKey") String resultKeyString, RestBuildWarnings request) throws WebValidationException, RepositoryException -
deleteBuildWarnings
@DELETE @Path("{repositoryId}/buildWarnings/{planResultKey}") public jakarta.ws.rs.core.Response deleteBuildWarnings(@PathParam("repositoryId") long repositoryId, @PathParam("planResultKey") String resultKeyString) throws WebValidationException, RepositoryException -
triggerBranchDetection
@POST @Path("{repositoryId}/detectBranches") public jakarta.ws.rs.core.Response triggerBranchDetection(@PathParam("repositoryId") long repositoryId, @QueryParam("ignoreChainsConfig") boolean ignoreChainsConfig) throws WebValidationException - Throws:
WebValidationException
-
clearSpecsStates
@POST @Path("clearSpecsStates") public jakarta.ws.rs.core.Response clearSpecsStates() -
getProjectRepositories
@GET @Path("project/{projectKey}/") public List<RestRepository> getProjectRepositories(@PathParam("projectKey") String projectKey) -
getLinkedRepositories
-