Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-11321

Create organization from GitHub organization or BitBucket team

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.5
    • Component/s: Organizations
    • Labels:
      None
    • Production Notes:
      Hide
      Just after the deployment, the GitHub and Bitbucket applications must be updated :
      - SonarCloud GitHub application needs to be updated with new setup url : https://sonarcloud.io/create-organization
      - SonarCloud GitHub application needs to be updated to request new permission "Organization members : Read"
      - SonarCloud Bitbucket application needs to be updated on Bitbucket Cloud side
      Show
      Just after the deployment, the GitHub and Bitbucket applications must be updated : - SonarCloud GitHub application needs to be updated with new setup url : https://sonarcloud.io/create-organization - SonarCloud GitHub application needs to be updated to request new permission "Organization members : Read" - SonarCloud Bitbucket application needs to be updated on Bitbucket Cloud side

      Description

      Use cases

      Use case #3 New or Existing user / want to create an SC organization from a remote organization
      Prototype #3

      • Goes to “Create Organization” page through the usual “+” button on the top bar
      • The “Create Organization” page now shows two tabs, one for importing from GH/BB and one for creating manually (no changes on the latter one)
      • The user can create a new SonarCloud org from the imported remote org, or simply bind it to an existing SonarCloud org. (See this use case in action in prototype #5)
      • The “Import from GH/BB” tab provides a second step to upgrade the imported org to a paid plan. This will allow the import of private projects with future developments.
      • After org creation, the user is redirected to the empty org page.

      Web Services

      • Create GET api/alm_integrations/show_organization
        • Description : Returns GitHub organization or Bitbucket team information
        • Parameter installationId : Installation ID of the GibHub's organization or Bitbucket team
        • Permission : Requires to be admin of the GibHub's organization or Bitbucket team
          • On GiHub /orgs/:orgs/members?role=admin API should be used (requires new scope Organization members : Read),
          • On Bitbucket /2.0/teams/:username should be used (require new scope team))
        • Response sample :
          {
            "almOrganization": {
              "key": "sonarsource",
              "name": "SonarSource",
              "description": "Continuous Code Quality",
              "url": "https://www.sonarsource.com",
              "avatar": "http://myavatar.com/12345",
              "personal": false
            },
            "boundOrganization": {
              "key": "sonarsource",
              "name": "SonarSource",
              "avatar": "http://myavatar.com/12347",
            }
          }
          
      • Create GET api/alm_integration/show_app_info
        • Description : Returns the information to install the alm application
        • Permission : Requires user to be authenticated
        • Response sample :
          {
            "application": {
              "key": "bitbucket",
              "name": "Bitbucket",
              "iconPath": "/static/authbitbucket/bitbucket.svg",
              "backgroundColor": "#0052cc",
              "installationUrl": "http://bitbucket.org/12345"
            }
          }
          
      • Update GET api/alm_integration/list_repositories
        • Remove application info as it's moved to api/alm_integration/show_app_info
      • Update POST api/organizations/create
        • Add parameter installationId : optional value, when set it will bind the organization to the ALM installation
      • Update GET api/organizations/search
        • Return ALM info when the organization is bound to an ALM application
          {
            "organization": "my-org",
            "alm": {
              "key": "github",
              "url": "https://github.org/myorg/"
            }
          }
          

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              gregoire.aubert Gregoire Aubert
              Reporter:
              julien.lancelot Julien Lancelot
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: