Skip to content

Commit

Permalink
[JENKINS-31574] Scan credentials are verified before to start the sca…
Browse files Browse the repository at this point in the history
…nning process
  • Loading branch information
Manuel Recena committed Nov 23, 2015
1 parent 0006bcf commit 425820b
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -109,8 +109,12 @@ public String getApiUri() {
listener.getLogger().format("No scan credentials, skipping%n");
return;
}
listener.getLogger().format("Connecting to GitHub using %s%n", CredentialsNameProvider.name(credentials));
GitHub github = Connector.connect(apiUri, credentials);
if (!github.isCredentialValid()) {
listener.getLogger().format("Invalid scan credentials, skipping%n");
return;
}
listener.getLogger().format("Connecting to GitHub using %s%n", CredentialsNameProvider.name(credentials));
GHMyself myself = null;
try {
myself = github.getMyself();
Expand Down

0 comments on commit 425820b

Please sign in to comment.