Workflow Condition using Bitbucket commit and pull request data.

Alton Washington October 11, 2018

 

Scenario 1: One Jira story with the following associated development data:

Repo1 ->Branch A

Repo2 ->Branch B 

Repo3 ->Branch C

1 commit to Branch A on Repo1. Pull request that has merged Branch A to Master.

1 commit to Branch B on Repo2. No pull request has been created.

1 commit to Branch C on Repo3. Pull request that is open merge Branch C to Master.

 

Currently, I can use  a JQL based condition using "issue.property[development].commits > 1 AND issue.property[development].openprs < 1", to prevent a workflow transition.  This scenario works fine.

Scenario 2: One Jira story with the following associated development data:

Repo1 ->Branch A

Repo2 ->Branch B 

Repo3 ->Branch C

1 commit to Branch A on Repo1. Pull request that has merged Branch A to Master.

1 commit to Branch B on Repo2. No pull request has been created.

1 commit to Branch C on Repo3. No pull request has been created.

In scenario 2, my condition would pass an allow the story to transition to the next step, but obviously since the commits on Branch B and Branch C of repo1 and repo2, respectively are not merged, this story is not ready to be transitioned to the next step.

Is there a way to write the JQL to check that all related commits are merged, or has someone already figured out a way to do this via another approach. 

 

0 answers

Suggest an answer

Log in or Sign up to answer