@@ -132,7 +132,7 @@ public class GitHubSCMNavigator extends SCMNavigator {
132132 /**
133133 * Whether to enable the retrieval of the Organization avatar. If false, then the default GitHub logo will be used.
134134 */
135- private boolean enableAvatar ;
135+ private Boolean enableAvatar ;
136136
137137 @ NonNull
138138 private List <SCMTrait <? extends SCMTrait <?>>> traits ;
@@ -227,7 +227,6 @@ public class GitHubSCMNavigator extends SCMNavigator {
227227 public GitHubSCMNavigator (String repoOwner ) {
228228 this .repoOwner = StringUtils .defaultString (repoOwner );
229229 this .traits = new ArrayList <>();
230- this .enableAvatar = false ;
231230 }
232231
233232 /**
@@ -314,7 +313,8 @@ public void setCredentialsId(@CheckForNull String credentialsId) {
314313 *
315314 * @return true is enabled, false otherwise
316315 */
317- public boolean isEnableAvatar () {
316+ @ CheckForNull
317+ public Boolean getEnableAvatar () {
318318 return enableAvatar ;
319319 }
320320
@@ -324,7 +324,7 @@ public boolean isEnableAvatar() {
324324 * @param enableAvatar true to enable, false to disable
325325 */
326326 @ DataBoundSetter
327- public void setEnableAvatar (boolean enableAvatar ) {
327+ public void setEnableAvatar (Boolean enableAvatar ) {
328328 this .enableAvatar = enableAvatar ;
329329 }
330330
@@ -391,6 +391,9 @@ private Object readResolve() {
391391 if (scanCredentialsId != null ) {
392392 credentialsId = scanCredentialsId ;
393393 }
394+ if (enableAvatar == null ) {
395+ enableAvatar = Boolean .TRUE ;
396+ }
394397 if (traits == null ) {
395398 boolean buildOriginBranch = this .buildOriginBranch == null || this .buildOriginBranch ;
396399 boolean buildOriginBranchWithPR = this .buildOriginBranchWithPR == null || this .buildOriginBranchWithPR ;
@@ -1557,7 +1560,7 @@ public List<Action> retrieveActions(
15571560 Connector .lookupScanCredentials ((Item ) owner , getApiUri (), credentialsId , repoOwner );
15581561 GitHub hub = Connector .connect (getApiUri (), credentials );
15591562 Connector .configureLocalRateLimitChecker (listener , hub );
1560- boolean privateMode = !enableAvatar || determinePrivateMode (apiUri );
1563+ boolean privateMode = !Boolean . TRUE . equals ( enableAvatar ) || determinePrivateMode (apiUri );
15611564 try {
15621565 GHUser u = hub .getUser (getRepoOwner ());
15631566 String objectUrl = u .getHtmlUrl () == null ? null : u .getHtmlUrl ().toExternalForm ();
0 commit comments