code: @SuppressWarnings("PMD")
      private List<RepoBranch> getGitRepoBranch(JSONObject buildJson) {
          List<RepoBranch> list = new ArrayList<>();        
          
          JSONArray actions = getJsonArray(buildJson, "actions");
          for (Object action : actions) {
              JSONObject jsonAction = (JSONObject) action;
              if (jsonAction.size() > 0) {
                  JSONObject lastBuiltRevision = null;
                  JSONArray branches = null;
                  JSONArray remoteUrls = getJsonArray ((JSONObject) action, "remoteUrls");       
                  if (!remoteUrls.isEmpty()) {
                  	lastBuiltRevision = (JSONObject) jsonAction.get("lastBuiltRevision");
                  }
                  if (lastBuiltRevision != null) {
                  	branches = getJsonArray (lastBuiltRevision, "branch");
                  }
                  // As of git plugin 3.0.0, when multiple repos are configured in the git plugin itself instead of MultiSCM plugin, 
              	// they are stored unordered in a HashSet. So it's buggy and we cannot associate the correct branch information.
                  // So for now, we loop through all the remoteUrls and associate the built branch(es) with all of them.
                  if (branches != null && !branches.isEmpty()) {
                  	for (Object url : remoteUrls) {
                  		String sUrl = (String) url;
                  		if (sUrl != null && !sUrl.isEmpty()) {
                  			sUrl = removeGitExtensionFromUrl(sUrl);
  		                	for (Object branchObj : branches) {
  		                		String branchName = getString((JSONObject) branchObj, "name");
  		                		if (branchName != null) {
  		                			String unqualifiedBranchName = getUnqualifiedBranch(branchName);
  		                			RepoBranch grb = new RepoBranch(sUrl, unqualifiedBranchName, RepoBranch.RepoType.GIT);
  		                			list.add(grb);
  		                		}
  		                	}
                  		}
                  	}
                  }
              }
          }
          return list;
      }
docs: Gathers repo urls, and the branch name from the last built revision.
  Filters out the qualifiers from the branch name and sets the unqualified branch name.
  We assume that all branches are in remotes/origin.