@Cacheable(value = LOCAL_CACHE_GITHUB_SCRIPTS, key = "#user.userId")
	public Map<String, List<GHTreeEntry>> getScripts(User user) throws FileNotFoundException {
		Map<String, List<GHTreeEntry>> scriptMap = new HashMap<>();
		getAllGitHubConfig(user).forEach(gitHubConfig -> {
			try {
				GitHub gitHub = getGitHubClient(gitHubConfig);
				GHRepository ghRepository = gitHub.getRepository(gitHubConfig.getOwner() + "/" + gitHubConfig.getRepo());

				String defaultBranch = ghRepository.getDefaultBranch();
				String configuredBranch = gitHubConfig.getBranch();
				String activeBranch = defaultBranch;

				if (!isEmpty(configuredBranch)) {
					activeBranch = configuredBranch;
				}
				String shaOfDefaultBranch = ghRepository.getBranch(activeBranch).getSHA1();
				List<GHTreeEntry> allFiles = ghRepository.getTreeRecursive(shaOfDefaultBranch, 1).getTree();
				List<GHTreeEntry> scripts = filterScript(allFiles, removePrependedSlash(gitHubConfig.getScriptRoot()));

				if (scripts.size() > 0) {
					scripts.forEach(script -> script.setSha(createScriptRevisionUrl(ghRepository.getSvnUrl(), shaOfDefaultBranch, script.getPath())));
				}
				scriptMap.put(gitHubConfig.getName() + ":" + gitHubConfig.getRevision(), scripts);
			} catch (IOException e) {
				log.error("Fail to get script from github with [userId({}), {}]", user.getUserId(), gitHubConfig, e);
				throw new NGrinderRuntimeException("Fail to get script from github.\ncause: " + e.getCause(), e);
			}
		});
		return scriptMap;
	}
Get ngrinder test scripts from user github repository.

@since 3.5.0
ngrinder-controller/src/main/java/org/ngrinder/script/service/GitHubFileEntryService.java