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

Allow multiple GitHub instances for pull request decoration

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 8.1
    • Component/s: Branch & PR, Settings
    • Labels:
      None
    • Edition:
      Enterprise
    • Production Notes:
      None

      Description

      Description

      In Enterprise Edition, It should be possible to configure multiple GitHub servers for pull request decoration.

      At global level, here are the settings for each GitHub instance :

      • Identifier of the instance
      • GitHub API URL
      • GitHub App ID
      • GitHub App private key

      At project level, here is the additional setting to be associate to the selected instance :

      • Repository identifier

      Web services

      Global-level web services

      • api/alm_settings/list_definitions : Return list of ALM instances
        • Require 'Administer System' permission
        • No parameter
        • Response example :
          {
            "github": [
              {
                "key": "GitHub Server - Dev Team",
                "url": "https://github.enterprise.com",
                "appId": "12345",
                "privateKey": "*****"
              }
            ]
          }
          
      • api/alm_settings/create_github
        • Require 'Administer System' permission
        • Mandatory parameters :
          • key, url, appId, privateKey
      • api/alm_settings/update_github
        • Require 'Administer System' permission
        • Mandatory parameters :
          • key, url, appId, privateKey
      • api/alm_settings/delete
        • Require 'Administer System' permission
        • Mandatory parameter : key
      • api/alm_settings/count_binding : Count number of projects bound to an instance, it will mainly be used when deleting a alm instance, in order to warn user about the impact
        • Require 'Administer System' permission
        • Mandatory parameter : instance

      Project-level web services

      • api/alm_settings/list : list of alm settings with only identifiers
        • Require 'Administer' permission on project
        • Mandatory parameters : project
        • Response example :
          {
            "almSettings" : [
                {
                  "key": "GitHub Server - Dev Team",
                  "alm": "github",
                  "url": "https://github.enterprise.com"
                }
            ]
          }
          
      • api/alm_settings/get_binding
        • Require 'Administer' permission on project
        • Mandatory parameters : project
        • Response example :
            {
              "key": "GitHub Server - Dev Team",
              "alm": "github",
              "url": "https://github.enterprise.com",
              "repository": "team/project"
            }
          
      • api/alm_settings/set_github_binding
        • Require 'Administer' permission on the project
        • Mandatory parameters :
          • almSetting, project, repository
      • api/alm_settings/delete_binding
        • Require 'Administer' permission on the project
        • Mandatory parameters : almSetting, project

      Database

      The following settings will be dropped :

      • sonar.pullrequest.github.endpoint
      • sonar.alm.github.app.name
      • sonar.alm.github.app.id
      • sonar.alm.github.app.privateKeyContent.secured
      • sonar.pullrequest.github.repository

      Existing values should be migrated to new db structure.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              wouter.admiraal Wouter Admiraal
              Reporter:
              julien.lancelot Julien Lancelot
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: