Could we get a button/some other way to retrigger a pull-request style pipeline against latest target branch state

Issue #18307 new
Dave Salisbury
created an issue

I currently have a situation where I've got two branches and PRs open. They both branch from a broken commit (B) on master.

PR #1 (commit C) fixes the breakage PR #2 (commit D) tweaks the bitbucket-pipelines.yml file, and is essentially unrelated to PR #1

My repo has a pipelines file with a pull-requests: ** configuration to run the pipeline against a post-merge commit.

PR #1 and PR #2 were both created from commit B.

In PR #1, commit C fixes the breakage and the has a green pipeline.

In PR #2, the breakage is still present so the resulting pipeline of commit D merged with B failed.

At some point later, both PRs were approved and PR#1 was merged.

My state looks something like this:

          C (pr #1)
       ↗    ↘  (pull request is merged to master)
A -> B  -----> E 
       ↘        
          D (pr #2)

My question is this:

How can I run a new pipeline for PR #2 against the result of merging D and E?

  • If I RERUN the existing pipeline, it runs with the old state of the target branch (i.e. merges D and B, and the pipeline fails as the breakage is still present)
  • If I manually execute a pipeline for the branch with commit D, using the pull-requests: ** configuration, no merge happens at all (essentially treating it as if it's not a pull-request pipeline at all)

I have some other options:

  1. Merge master (commit E) into my branch and push the change
  2. git commit --amend commit D to D' and force-push it

Instead, it would be great if there was some way to say "hey pipelines, run the pipeline for my PR against the latest state of the target branch". Perhaps a thing in the UI which shows up if the latest pipeline ran against an outdated commit on the target branch?

Comments (2)

  1. Log in to comment