Details

    • Similar Issues:

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                jglick Jesse Glick
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: