Create Bitbucket Data Center plugin procedures

2 minute readExtensibilityDeveloper productivity

Plugin procedures can be used in procedure steps, process steps, and pipeline tasks, allowing you to orchestrate third-party tools at the appropriate time in your component, application process, or pipeline.

Depending on your plugin configuration and how you run procedures, the Input parameters  Configuration name field may behave differently in the CloudBees CD/RO UI. For more information, refer to Differences in plugin UI behavior.

Change pull request status

Change a pull request status.

Input parameters

Table 1. Change pull request status input parameters
Parameter Description

Configuration name

Required. The previously defined configuration for the plugin.

Project key

Required. The project key.

Repository slug

Required. The repository slug.

Pull request ID

Required. The pull request ID.

User slug

Required. The slug for the user changing their status.

Status

Required. The status of the pull request.

Create pull request

Creates a pull request.

Input parameters

Table 2. Create pull request input parameters
Parameter Description

Configuration name

Required. The previously defined configuration for the plugin.

Project key

Required. The project key.

Repository slug

Required. The repository slug.

Source

Required. The source branch or tag name. For example, my-feature-branch.

Destination

Required. The destination branch name. For example, master.

Title

The pull request title.

Description

The description for the pull request.

Reviewers

The usernames of the reviewers, separated by a newline. If a username is provided, the user must have permission to view this pull request.

Output parameters

Table 3. Create pull request output parameters
Parameter Description

id

Pull request ID

link

Link to the created pull request

version

The current version of the pull request

Merge pull request

Merge a pull request.

Input parameters

Table 4. Merge pull request input parameters
Parameter Description

Configuration name

Required. The previously defined configuration for the plugin.

Project key

Required. The project key.

Repository slug

Required. The repository slug.

Pull request ID

Required. The pull request ID.

Version

The current version of the pull request.

Post commit status

Posts a status of the build associated with the commit.

Input parameters

Table 5. Post commit status input parameters
Parameter Description

Configuration name

Required. The previously defined configuration for the plugin.

Project key

Required. The project key.

Repository slug

Required. The repository slug.

Commit ID

Required. The ID (SHA) of the commit to post the status to. For example, bdfd735733a798823193e5997576b50aba1033e6.

Key

Required. The unique key identifying the current build phase.

URL

URL referring to the build result page in the CloudBees CD/RO tool.

Name

The build phase’s name shown on BitBucket Data Center.

Description

Describes the build result.

Mimic runtime status

If selected, the Bitbucket status is posted according to the status of the current CloudBees CD/RO runtime.

Status

Provides an indication of the status of the commit.