Merge pull request #39654 from appsmithorg/chore/detach-remote

chore: modified reactive chain consumption for the detach remote
This commit is contained in:
Ashit Rath 2025-03-11 11:12:46 +05:30 committed by GitHub
commit 5537ea80d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1669,7 +1669,15 @@ public class CentralGitServiceCEImpl implements CentralGitServiceCE {
.filter(artifact -> {
return artifact.getId().equals(baseArtifactId);
})
.next();
.collectList()
.flatMap(filteredBaseArtifact -> {
if (!filteredBaseArtifact.isEmpty()) {
return Mono.just(filteredBaseArtifact.get(0));
}
return Mono.error(new AppsmithException(
AppsmithError.GIT_GENERIC_ERROR, GitCommandConstants.DELETE));
});
return Mono.zip(deleteAllBranchesExceptBase, removeRepoMono).map(Tuple2::getT1);
})