a8n: Be liberal in what to accept as Refs in BitbucketServerSource
Created by: mrnugget
This fixes #6895 by changing the BitbucketServerSource to check whether the passed in Ref has a refs/heads/
prefix or not. If it doesn't, it prefixes it.
This was caused by the change in 2dfeb7b as part of #6682 in which we persist the base ref of a repository on the CampaignJob
. I wrongly assumed that the ref returned by gitserver
is only the name, i.e. master
and not refs/heads/master
.
I changed the relevant tests to reflect that more.