public interface PluginBuildServerClient
Modifier and Type | Method and Description |
---|---|
Optional<BuildStatusAction> |
getAction(com.atlassian.bitbucket.build.status.RepositoryBuildStatus buildStatus,
String actionId)
Get and action by ID.
|
URI |
getAuthorizationUrl()
The URI that can be used for the current user to authorize Bitbucket to act with the requested build server on
their behalf.
|
URI |
getAuthorizationUrl(URI callback)
The URI that can be used for the current user to authorize Bitbucket to act with the requested build server on
their behalf.
|
BuildOperations |
getOperations(com.atlassian.bitbucket.build.status.RepositoryBuildStatus buildStatus)
A collection containing the actions that can be performed by the currently authenticated user.
|
boolean |
isAuthorizationRequired()
Check whether or not Bitbucket has been authorized to act on this build server on the current user's behalf.
|
ActionResult |
performAction(BuildStatusActionRequest request)
Start the action.
|
@Nonnull Optional<BuildStatusAction> getAction(@Nonnull com.atlassian.bitbucket.build.status.RepositoryBuildStatus buildStatus, @Nonnull String actionId)
Optional.empty()
if the ID does not correspond to
any action this client is aware of. It is strongly advised to not issue any requests to
external systems as part of this method call. Authorisation and credential checks should not be
performed as part of this method call.buildStatus
- the build status that the action relates toactionId
- the ID of the action that should be returnedBuildStatusAction
for the provided ID, or Optional.empty()
if no action with the provided
ID is available for the provided build status@Nonnull BuildOperations getOperations(@Nonnull com.atlassian.bitbucket.build.status.RepositoryBuildStatus buildStatus)
buildStatus
- the build status to run the actions on.@Nonnull URI getAuthorizationUrl(@Nonnull URI callback)
callback
- the Web UI URI to redirect to after authorization is complete@Nonnull URI getAuthorizationUrl()
boolean isAuthorizationRequired()
true
if the current user needs to authorize, or false
if they are already authorized@Nonnull ActionResult performAction(@Nonnull BuildStatusActionRequest request)
ActionResult
.request
- the request containing the information to perform the actionCopyright © 2024 Atlassian. All rights reserved.