On Repository Naming Rule in Bamboo 3.4.x

I want to discern multiple repositories in a Plan.

A ResultsSummary has multiple List<RepositoryChangeset> accordingly to the repositories in a Plan.

To know which RepositoryChangeset is related to which repository, I guess repositoryChangeset.getRepositoryDefinition().getName() is the only way.

It returns like 'Subversion Web', 'Subversion Repository' and so on.

When the repository is Subversion, the repository name becomes 'Subversion' + ' ' + '[Repository Root Path Name with the first letter upper-cased]'.

Is this right?

2 answers

1 accepted

1 vote

Hmm, how about RepositoryChangeset.getRepositoryDefinition().getId() and use it to get the repository using

PlanHeleper.getRepositoryDefinitionMap() ? You'll get a RepoDef and you can call getRepository on it.

0 vote

The repositories can be renamed, so you shouldn't rely on naming. If you want to identify a repository, you should use getId instead of getName.

Sorry for my some misunderstandins.

I want to know which RepositoryChangeset obtained by ResultsSummary#getRepositoryChangesets()

is related to which Repository obtained by PlanHelper.getRepositories(getPlan()).

The repositoryChangeset.getRepositoryDefinition().getId() is good, but on the other hand SvnRepository seems not to have getId().

Suggest an answer

Log in or Join to answer
Community showcase
Renan Battaglin
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,097 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot