Branches saved off of non-master cause false "duplicate name" error, don't save content

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      It looks like github is treating the default branch (nominally master) specially - and this is causing the "save as branch" to only work  properly off the master branch. 

       

      If you try to save from a non default branch, it will just save the content from the master branch to the new branch, and incorreclty report it as a duplicate when trying to save the changed content. 

       

      Write up: 
      When editing a Declarative Pipeline Jenkinsfile on the master branch, and adding it to a new branch from the editor, everything works great. But if you edit the Jenkinsfile in the branch created in the editor, and try to create a new branch from there, the branch gets created before the changes to the Jenkinsfile are saved.

      Steps to recreate:
      1. Make a change to your Jenkinsfile using the editor, and save it to a new branch. Here's a screenshot of this step already completed, where the branch I created is called "CreateANewBranchForNoReason"

      2. Provide a description of the change, and a new branch name.
      3. Click "Save & run." Notice that you get an error back, saying the branch already exists:

      4. Flip over to GitHub itself, and look at your repository. The branch has been created:

      5. The only way to dismiss the popup is to click Cancel.
      6. Also note that the "Updated" information shown in GitHub is way wrong, by 5 hours. It's reporting 5 hours ago, when I actually ran through these steps about 10 minutes ago:

        1. image-2017-03-21-20-58-59-321.png
          222 kB
          Karl Shultz
        2. image-2017-03-21-21-01-13-875.png
          282 kB
          Karl Shultz
        3. image-2017-03-21-21-02-16-445.png
          251 kB
          Karl Shultz
        4. image-2017-03-21-21-07-03-135.png
          266 kB
          Karl Shultz

            Assignee:
            Keith Zantow
            Reporter:
            Karl Shultz
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: