code: @VisibleForTesting
      protected Function<Credential, GitHubServerConfig> toGHServerConfig() {
          return new Function<Credential, GitHubServerConfig>() {
              @Override
              public GitHubServerConfig apply(Credential input) {
                  LOGGER.info("Migrate GitHub Plugin creds for {} {}", input.getUsername(), input.getApiUrl());
                  GitHubTokenCredentialsCreator creator =
                          Jenkins.getInstance().getDescriptorByType(GitHubTokenCredentialsCreator.class);
  
                  StandardCredentials credentials = creator.createCredentials(
                          input.getApiUrl(),
                          input.getOauthAccessToken(),
                          input.getUsername()
                  );
  
                  GitHubServerConfig gitHubServerConfig = new GitHubServerConfig(credentials.getId());
                  gitHubServerConfig.setApiUrl(input.getApiUrl());
  
                  return gitHubServerConfig;
              }
          };
      }
docs: Creates new string credentials from token
  
  @return converter to get all useful info from old plain creds and crete new server config