public interface

BuildStatusService

com.atlassian.bitbucket.build.BuildStatusService

Class Overview

Manages build statuses.

Summary

Public Methods
@Nonnull Page<BuildStatus> findAll(String commitId)
Retrieves a page of build statuses associated with the specified commit.
@Nonnull Map<StringBuildSummary> getSummaries(Collection<String> commitIds)
Retrieves summaries for the builds associated with all of the specified commits.
@Nonnull BuildSummary getSummary(String commitId)
Retrieves a summary of all the builds associated with the specified commit.
void set(BuildStatusSetRequest request)
Sets the build status for a commit, replacing any existing status with the same key

Public Methods

@Nonnull public Page<BuildStatus> findAll (String commitId)

Retrieves a page of build statuses associated with the specified commit.

Parameters
commitId the ID of the commit to retrieve builds for
Returns
  • a page of build statuses
Throws
AuthorisationException if the current user is not licensed

@Nonnull public Map<StringBuildSummary> getSummaries (Collection<String> commitIds)

Retrieves summaries for the builds associated with all of the specified commits. If any of the specified commits do not have builds associated with them, their ID will not be included in the returned Map.

Returns
  • a map from commit IDs to summaries, which can have a length smaller than the number of specified commits if any do not have build statuses associated with them.
Throws
AuthorisationException if the current user is not licensed

@Nonnull public BuildSummary getSummary (String commitId)

Retrieves a summary of all the builds associated with the specified commit.

Parameters
commitId the ID of the commit to retrieve a summary for
Returns
  • stats for all the builds associated with the commitId.
Throws
AuthorisationException if the current user is not licensed

public void set (BuildStatusSetRequest request)

Sets the build status for a commit, replacing any existing status with the same key

Parameters
request describes the build status and the commit it should be associated with
Throws
AuthorisationException if the current user is not licensed