Bitbucket Data Center API Client
    Preparing search index...

    Class CommitResource

    Represents a Bitbucket commit resource with chainable async methods.

    Implements PromiseLike<BitbucketCommit> so it can be awaited directly to fetch the commit info, while also exposing sub-resource methods.

    // Await directly to get commit info
    const commit = await bbClient.project('PROJ').repo('my-repo').commit('abc123');

    // Get file changes introduced by this commit
    const changes = await bbClient.project('PROJ').repo('my-repo').commit('abc123').changes();

    // Get the full diff for this commit
    const diff = await bbClient.project('PROJ').repo('my-repo').commit('abc123').diff();

    Implements

    Index

    Methods

    • Posts a build status for this commit.

      POST /rest/build-status/latest/commits/{id}

      Parameters

      • data: AddBuildStatusData

        Build state, key, url and optional metadata

      Returns Promise<BitbucketBuildStatus>

      The created build status

    • Fetches the build statuses associated with this commit.

      GET /rest/build-status/latest/commits/{id}

      Parameters

      • Optionalparams: BuildStatusesParams

        Optional filters: limit, start, key

      Returns Promise<PagedResponse<BitbucketBuildStatus>>

      A paged response of build statuses