-
Improvement
-
Resolution: Fixed
-
Major
In some cases an SCMSource implementation will receive a Job (branch project) from somewhere, such as a listener, and need to know which SCMHead it corresponds to. This information is not currently retrievable directly; you have to assume that every BranchProjectFactory creates children whose Job.name matches SCMHead.name, as both WorkflowMultiBranchProjectFactory and LiterateMultibranchProject.ProjectFactoryImpl in fact do, and as MultiBranchProject itself seems to require (cf. Javadoc for getOrCreateBranchItemsFor).
Would be nicer for scm-api to include some API letting you map Item to SCMHead. The implementation in branch-api would just call BranchProjectFactory.getBranch. Thus you could reliably get this reverse mapping without a branch-api dependency.
- is blocking
-
JENKINS-30744 multibranch issues if branch contains /
- Closed
- links to