@@ -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,7 @@ 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 ;
230+ this .enableAvatar = Boolean . TRUE ;
231231 }
232232
233233 /**
@@ -314,7 +314,8 @@ public void setCredentialsId(@CheckForNull String credentialsId) {
314314 *
315315 * @return true is enabled, false otherwise
316316 */
317- public boolean isEnableAvatar () {
317+ @ CheckForNull
318+ public Boolean getEnableAvatar () {
318319 return enableAvatar ;
319320 }
320321
@@ -324,7 +325,7 @@ public boolean isEnableAvatar() {
324325 * @param enableAvatar true to enable, false to disable
325326 */
326327 @ DataBoundSetter
327- public void setEnableAvatar (boolean enableAvatar ) {
328+ public void setEnableAvatar (Boolean enableAvatar ) {
328329 this .enableAvatar = enableAvatar ;
329330 }
330331
@@ -391,6 +392,9 @@ private Object readResolve() {
391392 if (scanCredentialsId != null ) {
392393 credentialsId = scanCredentialsId ;
393394 }
395+ if (enableAvatar == null ) {
396+ enableAvatar = Boolean .TRUE ;
397+ }
394398 if (traits == null ) {
395399 boolean buildOriginBranch = this .buildOriginBranch == null || this .buildOriginBranch ;
396400 boolean buildOriginBranchWithPR = this .buildOriginBranchWithPR == null || this .buildOriginBranchWithPR ;
@@ -1557,7 +1561,7 @@ public List<Action> retrieveActions(
15571561 Connector .lookupScanCredentials ((Item ) owner , getApiUri (), credentialsId , repoOwner );
15581562 GitHub hub = Connector .connect (getApiUri (), credentials );
15591563 Connector .configureLocalRateLimitChecker (listener , hub );
1560- boolean privateMode = !enableAvatar || determinePrivateMode (apiUri );
1564+ boolean privateMode = !Boolean . TRUE . equals ( enableAvatar ) || determinePrivateMode (apiUri );
15611565 try {
15621566 GHUser u = hub .getUser (getRepoOwner ());
15631567 String objectUrl = u .getHtmlUrl () == null ? null : u .getHtmlUrl ().toExternalForm ();
0 commit comments