Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-17249

API endpoint for {repo_slug} using PUT method does not allow parsing the mainbranch attribute

    XMLWordPrintable

Details

    Description

      As the title says, through the API today parsing the "mainbranch" attribute using the PUT method does absolutely nothing, the API gives a 200 code and does not alter the attribute within the repository
      The expected behavior in this case is for the attribute "mainbranch" to be updated parsing it through a json, like this:

      #!bash
      
      
      curl PUT -u <userAuthString> -H "Content-Type: application/json" https://api.bitbucket.org/2.0/repositories/<repo_slug>-d &#x27;{"mainbranch": { "type":"branch", "name": "<newmainbranch>"}}&#x27;
      
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            lmontiel@atlassian.com Leonardo M
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: