Source:
protected Set<String> create() { if (collaboratorNames != null) { return collaboratorNames; } GitHubSCMSourceHelper helper = getHelper(); listener.getLogger().format("Connecting to %s to obtain list of collaborators for '%s'%n", helper.apiURI, helper.repo); StandardCredentials credentials = Connector.lookupScanCredentials( (Item) getOwner(), helper.apiURI, getCredentialsId() ); try { GitHub github = Connector.connect(helper.apiURI, credentials); try { checkApiUrlValidity(github, credentials); Connector.checkApiRateLimit(listener, github); Connector.checkConnectionValidity(helper.apiURI, listener, credentials, github); String credentialsName = credentials == null ? "anonymous access" : CredentialsNameProvider.name(credentials); if (credentials != null && !isCredentialValid(github)) { listener.getLogger().format("Invalid scan credentials %s to connect to %s, " + "assuming no trusted collaborators%n", credentialsName, helper.apiURI); collaboratorNames = Collections.singleton(getRepoOwner()); } else { if (!github.isAnonymous()) { listener.getLogger() .format("Connecting to %s using %s%n", helper.apiURI, credentialsName); } else { listener.getLogger() .format("Connecting to %s with no credentials, anonymous access%n", helper.apiURI); } if (isNotBlank(getRepository())) { collaboratorNames = Collections.singleton(getRepoOwner()); } else { request.checkApiRateLimit(); String fullName = helper.repo; ghRepository = github.getRepository(fullName); repositoryUrl = ghRepository.getHtmlUrl(); return new LazyContributorNames(request, listener, github, ghRepository, credentials); } } return collaboratorNames; } finally { Connector.release(github); } } catch (IOException | InterruptedException e) { throw new WrappedException(e); } }

Target:
protected Set<String> create() { if (collaboratorNames != null) { return collaboratorNames; } GitHubSCMSourceHelper helper = getHelper(); listener.getLogger().format("Connecting to %s to obtain list of collaborators for %s%n", helper.apiURI, helper.repo); StandardCredentials credentials = Connector.lookupScanCredentials( (Item) getOwner(), helper.apiURI, getCredentialsId() ); try { GitHub github = Connector.connect(helper.apiURI, credentials); try { checkApiUrlValidity(github, credentials); Connector.checkApiRateLimit(listener, github); Connector.checkConnectionValidity(helper.apiURI, listener, credentials, github); String credentialsName = credentials == null ? "anonymous access" : CredentialsNameProvider.name(credentials); if (credentials != null && !isCredentialValid(github)) { listener.getLogger().format("Invalid scan credentials %s to connect to %s, " + "assuming no trusted collaborators%n", credentialsName, helper.apiURI); collaboratorNames = Collections.singleton(getRepoOwner()); } else { if (!github.isAnonymous()) { listener.getLogger() .format("Connecting to %s using %s%n", helper.apiURI, credentialsName); } else { listener.getLogger() .format("Connecting to %s with no credentials, anonymous access%n", helper.apiURI); } if (isBlank(getRepository())) { collaboratorNames = Collections.singleton(getRepoOwner()); } else { request.checkApiRateLimit(); String fullName = helper.repo; ghRepository = github.getRepository(fullName); repositoryUrl = ghRepository.getHtmlUrl(); return new LazyContributorNames(request, listener, github, ghRepository, credentials); } } return collaboratorNames; } finally { Connector.release(github); } } catch (IOException | InterruptedException e) { throw new WrappedException(e); } }