Class GitHubResource
java.lang.Object
com.atlassian.bamboo.plugins.git.rest.resource.GitHubResource
@Path("gh")
@Consumes({"application/xml","application/json"})
@Produces({"application/xml","application/json"})
@Singleton
public class GitHubResource
extends Object
-
Constructor Summary
ConstructorDescriptionGitHubResource
(com.atlassian.sal.api.message.I18nResolver i18nResolver, CachedRepositoryDefinitionManager cachedRepositoryDefinitionManager, CredentialsAccessor credentialsAccessor, com.atlassian.plugins.whitelist.OutboundWhitelist outboundWhitelist, BambooPermissionManager bambooPermissionManager) -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.Response
getAvailableRepositories
(javax.ws.rs.core.UriInfo uriInfo, RestRequest request) javax.ws.rs.core.Response
getBranches
(javax.ws.rs.core.UriInfo uriInfo, String owner, String name, RestRequest request) protected @NotNull GitHubAccessor
getGitHubAccessor
(com.atlassian.bamboo.plugins.git.rest.resource.GitHubResource.GithubAccessCredentials accessCredentials, String apiBaseUrl)
-
Constructor Details
-
GitHubResource
@Inject public GitHubResource(com.atlassian.sal.api.message.I18nResolver i18nResolver, CachedRepositoryDefinitionManager cachedRepositoryDefinitionManager, CredentialsAccessor credentialsAccessor, com.atlassian.plugins.whitelist.OutboundWhitelist outboundWhitelist, BambooPermissionManager bambooPermissionManager)
-
-
Method Details
-
getAvailableRepositories
@POST @Path("repositories") public javax.ws.rs.core.Response getAvailableRepositories(@Context javax.ws.rs.core.UriInfo uriInfo, RestRequest request) throws WebValidationException - Throws:
WebValidationException
-
getBranches
@POST @Path("repositories/{owner}/{name}/branches") public javax.ws.rs.core.Response getBranches(@Context javax.ws.rs.core.UriInfo uriInfo, @PathParam("owner") String owner, @PathParam("name") String name, RestRequest request) throws WebValidationException - Throws:
WebValidationException
-
getGitHubAccessor
@VisibleForTesting @NotNull protected @NotNull GitHubAccessor getGitHubAccessor(com.atlassian.bamboo.plugins.git.rest.resource.GitHubResource.GithubAccessCredentials accessCredentials, String apiBaseUrl)
-