Our repository contains a variant of the git-flow branch naming convention, where you will see
      branches such as dev/main or release/3.2

      Using multibranch, strange things happen:

      • dev/main gets displayed as dev%2Fmain, then on restart dev%252Fmain, then dev%25252Fmain and all history seems to be lost.

      This is likely down to / being a dodgy delimiter for a project name. I tried to fix this by adjusting WorkflowBranchProjectFactory thusly:

      -        WorkflowJob job = new WorkflowJob((WorkflowMultiBranchProject) getOwner(), branch.getName());
      +        String branchName = branch.getName().replace("/", "-");
      +        WorkflowJob job = new WorkflowJob((WorkflowMultiBranchProject) getOwner(), branchName);
      

      but it didn't seem to help.

      Happy to try to fix if I can get a pointer as to what to look at.

          [JENKINS-30744] multibranch issues if branch contains /

          magnayn created issue -
          Jesse Glick made changes -
          Labels Original: workflow New: multibranch
          Jesse Glick made changes -
          Description Original: Our repository contains a variant of the git-flow branch naming convention, where you will see
          branches such as dev/main or release/3.2

          Using multibranch, strange things happen:

          - dev/main gets displayed as dev%2Fmain, then on restart dev%252Fmain, then dev%25252Fmain and all history seems to be lost.

          This is likely down to / being a dodgy delimiter for a project name. I tried to fix this by adjusting WorkflowBranchProjectFactory thusly:

          - WorkflowJob job = new WorkflowJob((WorkflowMultiBranchProject) getOwner(), branch.getName());
          +
          + String branchName = branch.getName().replace("/", "-");
          +
          + WorkflowJob job = new WorkflowJob((WorkflowMultiBranchProject) getOwner(), branchName);

          but it didn't seem to help.

          Happy to try to fix if I can get a pointer as to what to look at.
          New: Our repository contains a variant of the git-flow branch naming convention, where you will see
          branches such as {{dev/main}} or {{release/3.2}}

          Using multibranch, strange things happen:

          - {{dev/main}} gets displayed as {{dev%2Fmain}}, then on restart {{dev%252Fmain}}, then {{dev%25252Fmain}} and all history seems to be lost.

          This is likely down to {{/}} being a dodgy delimiter for a project name. I tried to fix this by adjusting {{WorkflowBranchProjectFactory}} thusly:

          {code}
          - WorkflowJob job = new WorkflowJob((WorkflowMultiBranchProject) getOwner(), branch.getName());
          + String branchName = branch.getName().replace("/", "-");
          + WorkflowJob job = new WorkflowJob((WorkflowMultiBranchProject) getOwner(), branchName);
          {code}

          but it didn't seem to help.

          Happy to try to fix if I can get a pointer as to what to look at.
          Jesse Glick made changes -
          Link New: This issue depends on JENKINS-30252 [ JENKINS-30252 ]
          Jesse Glick made changes -
          Link New: This issue depends on JENKINS-30595 [ JENKINS-30595 ]
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-30798 [ JENKINS-30798 ]
          Jesse Glick made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Jesse Glick made changes -
          Remote Link New: This issue links to "PR 18 (Web Link)" [ 13506 ]
          Jesse Glick made changes -
          Remote Link New: This issue links to "workflow PR 243 (Web Link)" [ 13507 ]
          Jesse Glick made changes -
          Remote Link New: This issue links to "literate PR 8 (Web Link)" [ 13508 ]
          Jesse Glick made changes -
          Remote Link New: This issue links to "yaml-project PR 9 (Web Link)" [ 13509 ]

            jglick Jesse Glick
            magnayn magnayn
            Votes:
            14 Vote for this issue
            Watchers:
            47 Start watching this issue

              Created:
              Updated:
              Resolved: