Skip to content

Commit 92cb289

Browse files
committed
Merge remote-tracking branch 'origin/develop' into develop
2 parents 5c8f7fa + 06611cc commit 92cb289

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/main/java/com/epam/reportportal/extension/github/GitHubExtension.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,12 @@ public Optional<String> getAuthIntegrationType() {
152152

153153
@Override
154154
public Optional<Map<String, Object>> getAuthProviderInfo() {
155-
return Optional.of(Map.of(
156-
"button", GitHubOAuthProvider.BUTTON_HTML,
157-
"path", getAuthBasePath() + "/" + PROVIDER_NAME
158-
));
155+
return getAuthIntegrationType()
156+
.filter(type -> !integrationRepository.findAllByTypeIn(type).isEmpty())
157+
.map(_ -> Map.of(
158+
"button", GitHubOAuthProvider.BUTTON_HTML,
159+
"path", getAuthBasePath() + "/" + PROVIDER_NAME
160+
));
159161
}
160162

161163
@Override

0 commit comments

Comments
 (0)