Background
I've got a repository in Stash / Bitbucket Server. Let's say it's in a project called FOO, and the repository is named bar. It has a develop and master branch.
In Bamboo Server, I've got a linked repository corresponding to each branch:
FOO / bar / develop
FOO / bar / master
I created a Specs (a .java) such that it contains definitions for two plans - one for the develop branch and one for the master branch. I pass the string corresponding to the linked repository to each Plan generator:
public Plan createMasterPlan() {
.linkedRepositories("FOO / bar / master")
...
}
public Plan createDevelopPlan() {
.linkedRepositories("FOO / bar / develop")
...
}
Problem
Later on, I decided to add plan branch management to each. However, on the master plan, I specified createForPullRequest and on the develop plan I specified createForVcsBranch.
I also have Stash configured to retrieve Bamboo build statuses and attach them to commits. While creating a branch in Stash creates a plan branch on the develop plan as expected, pull requests to develop create a plan branch on the master plan.
I'm not particularly sure how to explain this behaviour. I'd like for pull requests to develop to not create a plan branch for master. I assume this happens because of the mismatched plan branch management definitions. Can anyone confirm? Anyone else seen behaviour like this before?
EDIT
I just changed the plan branch management definitions in my Specs to use createForPullRequest for both.
Apparently this has the same problem: the pull request I create causes two plan branches to be created - one for develop, one for master.