if (auth == null) {
setStatus(GitHubUi.createErrorStatus("Credentials are required. Please specify username and API Token."));
return;
}
GitHubCredentials credentials = new GitHubCredentials(auth.getUserName(), auth.getPassword());
if (!service.verifyCredentials(credentials)) {
setStatus(GitHubUi.createErrorStatus("Invalid credentials. Please check your GitHub User ID and API Token.\nYou can find your API Token on your GitHub account settings page."));
return;
}
} catch (GitHubServiceException e) {
setStatus(GitHubUi.createErrorStatus("Repository Test failed:"+ e.getMessage()));