For the complete documentation index, see llms.txt. This page is also available as Markdown.

Bitbucket

Bitbucket is Atlassian's Git-based platform for source code, pull requests, and CI/CD pipelines.

Connectors

Choose the connector that matches your authentication method. The options below use the names shown in StackAI.

Connector
Authentication

Bitbucket

OAuth sign-in

Bitbucket

Connect to Bitbucket Cloud via OAuth to work with repositories, pull requests, and your account.

Set up in Bitbucket

  1. Use a Bitbucket account with access to the records and operations that your workflow needs.

  2. If your organization restricts application access or user consent, have its administrator approve the connection before you sign in.

Set up in StackAI

  1. Open Settings → Connections, add a connection, and select Bitbucket.

  2. Select Connect, sign in to the provider account, and review the requested access. Complete authorization to return to StackAI.

  3. Save the connection and check its connection status. Select this saved connection when configuring an action or feature that uses it.

StackAI obtains the OAuth credentials during sign-in. You do not need to paste an access token or refresh token.

Provider documentation: Setup reference.

Verify the connection

Check that the connection is healthy. Then run a read operation against a resource the connected account can access. A successful connection check confirms authentication; it does not guarantee permission for every action.

If access is denied, check the credential or OAuth permissions, the selected account or environment, and access to the specific resource. Update expired credentials or reconnect after permissions change.

Use an action

  1. Add the required Bitbucket action to the workflow.

  2. Select a connection when the action requests one.

  3. Complete the required fields. Use the reference picker when a value comes from another workflow step.

  4. Run the workflow and inspect the action’s output. Check the result before using it in a later step.

Actions

Create Pull Request

Create a pull request in a Bitbucket repository.

Required permissions: pullrequest:write.

Inputs

Field
Type
Required
Description

Workspace

string

Yes

The Bitbucket workspace ID that owns the repository.

Repository

string

Yes

The repository slug.

Title

string

Yes

The pull request title.

Source Branch

string

Yes

The branch containing the changes to merge.

Destination Branch

string

No

The branch to merge into. Defaults to the repository's main branch.

Description

textarea

No

The pull request description (Markdown).

Close Source Branch

boolean

No

Close the source branch after the pull request is merged.

Outputs

Field
Type
Description

Pull Request ID

integer

The created pull request's ID.

Title

string

The created pull request's title.

State

string

The pull request state (e.g. OPEN).

Web URL

string

The pull request's web URL.

Trigger Pipeline

Trigger a Bitbucket Pipelines run on a branch.

Required permissions: pipeline:write.

Inputs

Field
Type
Required
Description

Workspace

string

Yes

The Bitbucket workspace ID that owns the repository.

Repository

string

Yes

The repository slug.

Branch

string

Yes

The branch to run the pipeline on.

Custom Pipeline

string

No

Name of a custom pipeline defined in bitbucket-pipelines.yml.

Outputs

Field
Type
Description

Pipeline UUID

string

The triggered pipeline's UUID.

Build Number

integer

The pipeline's build number.

State

string

The pipeline state (e.g. PENDING, IN_PROGRESS).

List Commits

List commits in a Bitbucket repository.

Required permissions: repository.

Inputs

Field
Type
Required
Description

Workspace

string

Yes

The Bitbucket workspace ID that owns the repository.

Repository

string

Yes

The repository slug.

Branch, tag, or commit

string

No

Limit commits to a branch, tag, or commit hash.

File path

string

No

Only return commits that touched this file or directory path.

Max results

integer

No

Max commits to return (1-5000). Minimum: 1. Maximum: 5000.

Outputs

Field
Type
Description

Commits

dict_array

The commits in the repository.

Count

integer

Number of commits returned.

Get Repository Source

Read a file's source from a Bitbucket repository at a given revision.

Required permissions: repository.

Inputs

Field
Type
Required
Description

Workspace

string

Yes

The Bitbucket workspace ID that owns the repository.

Repository

string

Yes

The repository slug.

Branch, tag, or commit

string

Yes

The branch, tag, or commit hash to read the file at.

File path

string

Yes

The path of the file within the repository.

Outputs

Field
Type
Description

Content

string

The raw file content (or a JSON directory listing for a folder).

Important behavior

If an operation is denied, check the connection’s granted permissions and the account’s access in the provider. Reauthorize the connection when it needs additional permissions.

Actions that create, update, send, or delete data can change the connected service. Review their inputs before running them. A retry can repeat an operation; consider this when configuring retries for actions that change data.

The catalog lists the fields and capabilities available in the supplied provider definition. Availability can also depend on your deployment and organization’s Feature Access settings.

Last updated

Was this helpful?