Represents a Bitbucket project resource with chainable async methods.

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

// Await directly to get project info
const project = await bbClient.project('PROJ');

// Get repositories with filters
const repos = await bbClient.project('PROJ').repos({ limit: 50, name: 'api' });

// Navigate into a specific repository
const prs = await bbClient.project('PROJ').repo('my-repo').pullRequests();

// Get users with access to the project
const users = await bbClient.project('PROJ').users({ permission: 'PROJECT_WRITE' });

Implements

Methods

  • Returns a RepositoryResource for a given repository slug, providing access to repository-level data and sub-resources (pull requests, commits, etc.).

    The returned resource can be awaited directly to fetch repository info, or chained to access nested resources.

    Parameters

    • repoSlug: string

      The repository slug (e.g., 'my-repo')

    Returns RepositoryResource

    A chainable repository resource

    const repo    = await bbClient.project('PROJ').repo('my-repo');
    const prs = await bbClient.project('PROJ').repo('my-repo').pullRequests({ state: 'OPEN' });
    const commits = await bbClient.project('PROJ').repo('my-repo').commits({ limit: 10 });