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 Details

  • 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

      @Path("project/rssEnable/{projectKey}/{repositoryName}") @POST public jakarta.ws.rs.core.Response enableRss(@PathParam("projectKey") String projectKey, @PathParam("repositoryName") String repositoryName)
    • 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, RepositoryException
      Used 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}'
      Throws:
      WebValidationException
      RepositoryException
    • 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
      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
      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

      @GET @Path("linked") public List<RestRepository> getLinkedRepositories()