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

Display repositories from the default collection of the Azure DevOps Sever

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 8.6
    • Component/s: Branch & PR
    • Labels:
      None
    • Edition:
      Developer
    • Production Notes:
      None

      Description

      Description

      When a user is creating a new Azure DevOps project, he should be able to set a PAT that will allow him to see the list of projects then the list of repositories he has access to.

      Here is the list of actions that should be possible:

      1. Validate and set a PAT
      2. List all projects from the default collection of the Azure DevOps server
      3. List repositories from a project
      4. Search for repositories

      List of web services:

      To be updated:

      • GET api/alm_integrations/check_pat
        • Azure DevOps ALM should be supported
      • POST api/alm_integrations/set_pat
        • Azure DevOps ALM should be supported

      To be created:

      • GET api/alm_integrations/list_azure_projects
        • Requires the 'Create Projects' permission
        • Parameters: almSetting
        • The following Azure DevOps Server API will be used :
          • GET https://<server>/DefaultCollection/_apis/projects?api-version=1.0
        • Response example :
          {
            "projects": [
              {
                "name": "Azure project name 1",
                "description": "Description of my project" // may be empty
              }
            ]
          }
          
      • GET api/alm_integrations/search_azure_repos
        • Requires the 'Create Projects' permission
        • Parameters: almSetting, projectName, repositoryName
        • The following Azure DevOps Server API will be used :
          • GET https://<server>/DefaultCollection/<project-key>/_apis/git/repositories?api-version=1.0
          • GET https://<server>/DefaultCollection/_apis/git/repositories?api-version=1.0
        • Response example :
          {
            "repositories": [
              {
                "name": "Azure repository name 1",
                "projectName": "Azure project name 1",
                "sqProjectKey": "SQ Project key (optional, only if repo is already bound to a SQ project)",
                "sqProjectName": "SQ Project name (optional, only if repo is already bound to a SQ project)",
              }
            ]
          }
          

       

      Webapp

      • Add an Azure DevOps Server button in the Add project dropdown
        • Based on api/alm_settings/list response
        • Button is available if there's only one ADO configuration.
        • Button is available if the URL field of this configuration isn't empty/null.
      • New PAT page:
        • Display help about the PAT
        • Check the current PAT (if any) at startup
          • Valid => move to project list
          • Invalid => ask for a new one
        • Save a PAT:
          • Valid => move to project list
          • Invalid => error
      • New Projects/Repositories page: 
        • List projects and display them as accordion (api/alm_integrations/list_azure_projects)
        • For every available project, list repositories and display them within their parent project accordion (api/alm_integrations/search_azure_repos & parameter projectName)
        • Implement the search feature (api/alm_integrations/search_azure_repos & parameter repositoryNameQuery)
        • Deal with pagination for projects
        • Deal with pagination for repositories

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              pierre.guillot Pierre Guillot
              Reporter:
              julien.lancelot Julien Lancelot
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: