public class BitbucketCloudCommitCommenter extends Object implements VcsCommitCommenter
| Modifier and Type | Class and Description |
|---|---|
static class |
BitbucketCloudCommitCommenter.DeploymentDTO |
static class |
BitbucketCloudCommitCommenter.MissingPermissionEntity |
static class |
BitbucketCloudCommitCommenter.PlanDTO |
| Modifier and Type | Field and Description |
|---|---|
protected Supplier<com.sun.jersey.api.client.Client> |
bitbucketClientSupplier |
| Constructor and Description |
|---|
BitbucketCloudCommitCommenter(AdministrationConfigurationAccessor administrationConfigurationAccessor,
CredentialsAccessor credentialsAccessor,
DeploymentProjectService deploymentProjectService,
ProjectManager projectManager,
RepositoryDefinitionManager repositoryDefinitionManager,
RepositoryStoredSpecsLogService repositoryStoreSpecsLogService,
TemplateRenderer templateRenderer) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addFilters(com.sun.jersey.api.client.WebResource resource,
com.sun.jersey.api.client.filter.ClientFilter... filters) |
protected com.sun.jersey.api.client.filter.HTTPBasicAuthFilter |
getAuthFilter(String username,
String password) |
protected com.sun.jersey.api.client.filter.LoggingFilter |
getLoggingFilter(org.apache.log4j.Logger log) |
ContextualVcsId |
getVcsIdForExecutor(VcsRepositoryData vcsRepositoryData)
Returned id has to fulfill the following:
Given two VcsRepositoryData objects A and B, and executor e returning equal ContextualVcsId (in terms of equals()),
for any operation foo() provided by the executor,
the calls e::foo(A) and e::foo(B) should be equivalent.
|
protected com.sun.jersey.api.client.WebResource.Builder |
prepareResourceCall(URI requestUri,
com.sun.jersey.api.client.filter.ClientFilter... filters) |
boolean |
publishComment(VcsRepositoryData repositoryData,
String commitId,
String payload)
Publish comment to repository commit.
|
boolean |
publishRssStatus(VcsRepositoryData repositoryData,
String commitId,
com.atlassian.event.Event event)
Publish Bamboo Specs execution status to repository commit.
|
protected final Supplier<com.sun.jersey.api.client.Client> bitbucketClientSupplier
@Inject public BitbucketCloudCommitCommenter(AdministrationConfigurationAccessor administrationConfigurationAccessor, CredentialsAccessor credentialsAccessor, DeploymentProjectService deploymentProjectService, ProjectManager projectManager, RepositoryDefinitionManager repositoryDefinitionManager, RepositoryStoredSpecsLogService repositoryStoreSpecsLogService, TemplateRenderer templateRenderer)
public boolean publishRssStatus(@NotNull
VcsRepositoryData repositoryData,
@NotNull
String commitId,
@NotNull
com.atlassian.event.Event event)
throws RepositoryException
VcsCommitCommenterpublishRssStatus in interface VcsCommitCommentercommitId - identifier of commit which should receive comment. For git-based repos it's SHA.event - is RssEvent from bamboo-core.RepositoryException - when commit not found or credentials are wrongpublic boolean publishComment(@NotNull
VcsRepositoryData repositoryData,
@NotNull
String commitId,
@NotNull
String payload)
throws RepositoryException
VcsCommitCommenterpublishComment in interface VcsCommitCommentercommitId - identifier of commit which should receive comment. For git-based repos it's SHA.payload - content of commentRepositoryException - when commit not found or credentials are wrong@Nullable public ContextualVcsId getVcsIdForExecutor(@NotNull VcsRepositoryData vcsRepositoryData)
IdentifyingExecutorVcsBranchDetector. If they also point
to the same branch, they are considered equal in context of VcsChangeDetectorgetVcsIdForExecutor in interface IdentifyingExecutor<VcsCommitCommenter>@Nullable protected com.sun.jersey.api.client.filter.HTTPBasicAuthFilter getAuthFilter(String username, String password)
@Nullable protected com.sun.jersey.api.client.filter.LoggingFilter getLoggingFilter(org.apache.log4j.Logger log)
protected void addFilters(com.sun.jersey.api.client.WebResource resource,
@NotNull
com.sun.jersey.api.client.filter.ClientFilter... filters)
@NotNull protected com.sun.jersey.api.client.WebResource.Builder prepareResourceCall(URI requestUri, @NotNull com.sun.jersey.api.client.filter.ClientFilter... filters)
Copyright © 2020 Atlassian Software Systems Pty Ltd. All rights reserved.