Skip to content

Commit

Permalink
[FIXED JENKINS-47902] I think this is the fix
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenc committed Nov 9, 2017
1 parent f603ac5 commit 6d33fba
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -1218,15 +1218,15 @@ protected SCMRevision retrieve(@NonNull String headName, @NonNull TaskListener l
}
try {
GHBranch branch = ghRepository.getBranch(headName);
if (branch != null && context.wantBranches()) {
if (branch != null) {
return new SCMRevisionImpl(new BranchSCMHead(headName), branch.getSHA1());
}
} catch (FileNotFoundException e) {
// maybe it's a tag
}
try {
GHRef tag = ghRepository.getRef("tags/" + headName);
if (tag != null && context.wantTags()) {
if (tag != null) {
long tagDate = 0L;
String tagSha = tag.getObject().getSha();
if ("tag".equalsIgnoreCase(tag.getObject().getType())) {
Expand Down

0 comments on commit 6d33fba

Please sign in to comment.