Skip to content

Commit

Permalink
[JENKINS-41246] Would help to actually do the null check I added a co…
Browse files Browse the repository at this point in the history
…mment about
  • Loading branch information
stephenc committed Jul 4, 2017
1 parent a0c20fb commit 9abb96c
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -63,8 +63,8 @@ public final class PullRequestSCMHead extends SCMHead implements ChangeRequestSC
this.target = new BranchSCMHead(pr.getBase().getRef());
// the source stuff is immutable for a pull request on github, so safe to store here
GHRepository repository = pr.getHead().getRepository(); // may be null for deleted forks JENKINS-41246
this.sourceOwner = repository.getOwnerName();
this.sourceRepo = repository.getName();
this.sourceOwner = repository == null ? null : repository.getOwnerName();
this.sourceRepo = repository == null ? null : repository.getName();
this.sourceBranch = pr.getHead().getRef();
}

Expand Down

0 comments on commit 9abb96c

Please sign in to comment.