How to update a pull request name using Bitbucket Command Line Interface (CLI)

This article explains how to update the name of a pull request using the Bitbucket Command Line Interface (CLI) app. Pull requests are a feature that makes it easier for developers to collaborate using Bitbucket.

Instructions

Use the updatePullRequest action to update the name of a pull request.

Execute the following action to update the name of the pull request:

--action updatePullRequest --project "TRAIN" --repository "Repo_Training" --pullRequest "PR_code" --name "PR_new"

The output of the CLI action with the given sample values is as follows:

Pull request: 9 updated with name: PR_new

The following screenshot shows the pull request name before and after executing the CLI action:

The parameters used with the action are:

  • --project value refers to the project key.
  • --repository value refers to the repository name.
  • --pullRequest value refers to the current name of the pull request.
  • --name value refers to the new name of the pull request.

It is recommended to test the command in a non-production environment before running in productionor, run the action with --simulate parameter to verify the behaviour before deploying.