Cannot get the repositories from the git plugin via the API

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

XMLWordPrintable

      I'm trying to write a plugin that needs information from SCM plugins.

      I'm having trouble extracting information from the Git plugin. I think it has some bugs that are causing it to not report data even though there's a great good deal of code in there to generate the answers.

      Specifically, I can't find any incantation of scm/api/json that returns useful data in the repositories attribute. It seems to be an empty list. JENKINS-14588 reports that the 'branches' field is also empty. I'm curious if the root cause is similar for both or if they're separate issues.

      {
      "browser" : null,
      "type" : "hudson.plugins.git.GitSCM",
      "branches" : [
      {

      }
      ],
      "mergeOptions" :

      { "mergeRemote" : null, "mergeTarget" : null, "remoteBranchName" : null }

      ,
      "repositories" : [
      {

      }
      ],
      "userRemoteConfigs" : [

      { "name" : "", "refspec" : "", "url" : "ssh://git-server:29418/projectname" }

      ]
      }

            Assignee:
            Unassigned
            Reporter:
            Jason Marshall
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: