Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-23152

Trigger a pull-requests pipeline manually from the UI for a specific PR (instead of branch)

XMLWordPrintable

    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      Problem Definition

      When triggering a pipeline manually (from the Pipelines page of a repo > Run pipeline) there is no option to run a pull-requests pipeline for a certain PR. Pipelines can be triggered only for a specific branch.

      Some users who have pull-requests pipelines may use the [skip ci] option on commits and they want to be able to run a pull-requests pipeline manually for a certain PR.

      Running a pull-requests pipeline for a branch does not have the same behavior as running it for a PR (where the PR branches are merged during the build and the PR default variables are available).

      Suggested Solution

      Provide users the option to select a certain PR when triggering a pull-requests pipeline manually from the UI.

      Workaround

      There are two workarounds at the moment:

      1. Trigger a pull-requests pipeline via API:

      https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pipelines/#trigger-a-pull-request-pipeline

      This will work even if the last commit of the source branch has [skip ci] in its message.

      2. In a clone of the repo, create an empty commit on the source branch without the [skip ci] option:

      git commit --allow-empty -m "Empty commit to trigger the pull-requests pipeline"
      

      When that empty commit is pushed to the source branch, the pull-requests pipeline will be triggered.

              Unassigned Unassigned
              tboudale Theodora Boudale
              Votes:
              8 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated: